<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><link rel="stylesheet" type="text/css" href="style.css" /><script type="text/javascript" src="highlight.js"></script></head><body><pre><span class="hs-pragma">{-# LANGUAGE FlexibleContexts #-}</span><span>
</span><span id="line-2"></span><span class="hs-pragma">{-# LANGUAGE RankNTypes #-}</span><span>
</span><span id="line-3"></span><span>
</span><span id="line-4"></span><span class="hs-keyword">module</span><span> </span><span class="hs-identifier">Distribution.Simple.Test.LibV09</span><span>
</span><span id="line-5"></span><span>       </span><span class="hs-special">(</span><span> </span><span class="annot"><a href="Distribution.Simple.Test.LibV09.html#runTest"><span class="hs-identifier">runTest</span></a></span><span>
</span><span id="line-6"></span><span>         </span><span class="hs-comment">-- Test stub</span><span>
</span><span id="line-7"></span><span>       </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="Distribution.Simple.Test.LibV09.html#simpleTestStub"><span class="hs-identifier">simpleTestStub</span></a></span><span>
</span><span id="line-8"></span><span>       </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="Distribution.Simple.Test.LibV09.html#stubFilePath"><span class="hs-identifier">stubFilePath</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="Distribution.Simple.Test.LibV09.html#stubMain"><span class="hs-identifier">stubMain</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="Distribution.Simple.Test.LibV09.html#stubName"><span class="hs-identifier">stubName</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="Distribution.Simple.Test.LibV09.html#stubWriteLog"><span class="hs-identifier">stubWriteLog</span></a></span><span>
</span><span id="line-9"></span><span>       </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="Distribution.Simple.Test.LibV09.html#writeSimpleTestStub"><span class="hs-identifier">writeSimpleTestStub</span></a></span><span>
</span><span id="line-10"></span><span>       </span><span class="hs-special">)</span><span> </span><span class="hs-keyword">where</span><span>
</span><span id="line-11"></span><span>
</span><span id="line-12"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="../../base/src/Prelude.html#"><span class="hs-identifier">Prelude</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-special">)</span><span>
</span><span id="line-13"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="Distribution.Compat.Prelude.html"><span class="hs-identifier">Distribution.Compat.Prelude</span></a></span><span>
</span><span id="line-14"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="Distribution.Types.UnqualComponentName.html"><span class="hs-identifier">Distribution.Types.UnqualComponentName</span></a></span><span>
</span><span id="line-15"></span><span>
</span><span id="line-16"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="Distribution.Compat.CreatePipe.html"><span class="hs-identifier">Distribution.Compat.CreatePipe</span></a></span><span>
</span><span id="line-17"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="Distribution.Compat.Environment.html"><span class="hs-identifier">Distribution.Compat.Environment</span></a></span><span>
</span><span id="line-18"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="Distribution.Compat.Internal.TempFile.html"><span class="hs-identifier">Distribution.Compat.Internal.TempFile</span></a></span><span>
</span><span id="line-19"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="Distribution.ModuleName.html"><span class="hs-identifier">Distribution.ModuleName</span></a></span><span>
</span><span id="line-20"></span><span class="hs-keyword">import</span><span> </span><span class="hs-keyword">qualified</span><span> </span><span class="annot"><a href="Distribution.PackageDescription.html"><span class="hs-identifier">Distribution.PackageDescription</span></a></span><span> </span><span class="hs-keyword">as</span><span> </span><span class="annot"><span class="hs-identifier">PD</span></span><span>
</span><span id="line-21"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="Distribution.Simple.Build.PathsModule.html"><span class="hs-identifier">Distribution.Simple.Build.PathsModule</span></a></span><span>
</span><span id="line-22"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="Distribution.Simple.BuildPaths.html"><span class="hs-identifier">Distribution.Simple.BuildPaths</span></a></span><span>
</span><span id="line-23"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="Distribution.Simple.Compiler.html"><span class="hs-identifier">Distribution.Simple.Compiler</span></a></span><span>
</span><span id="line-24"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="Distribution.Simple.Hpc.html"><span class="hs-identifier">Distribution.Simple.Hpc</span></a></span><span>
</span><span id="line-25"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="Distribution.Simple.InstallDirs.html"><span class="hs-identifier">Distribution.Simple.InstallDirs</span></a></span><span>
</span><span id="line-26"></span><span class="hs-keyword">import</span><span> </span><span class="hs-keyword">qualified</span><span> </span><span class="annot"><a href="Distribution.Simple.LocalBuildInfo.html"><span class="hs-identifier">Distribution.Simple.LocalBuildInfo</span></a></span><span> </span><span class="hs-keyword">as</span><span> </span><span class="annot"><span class="hs-identifier">LBI</span></span><span>
</span><span id="line-27"></span><span class="hs-keyword">import</span><span> </span><span class="hs-keyword">qualified</span><span> </span><span class="annot"><a href="Distribution.Types.LocalBuildInfo.html"><span class="hs-identifier">Distribution.Types.LocalBuildInfo</span></a></span><span> </span><span class="hs-keyword">as</span><span> </span><span class="annot"><span class="hs-identifier">LBI</span></span><span>
</span><span id="line-28"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="Distribution.Simple.Setup.html"><span class="hs-identifier">Distribution.Simple.Setup</span></a></span><span>
</span><span id="line-29"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="Distribution.Simple.Test.Log.html"><span class="hs-identifier">Distribution.Simple.Test.Log</span></a></span><span>
</span><span id="line-30"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="Distribution.Simple.Utils.html"><span class="hs-identifier">Distribution.Simple.Utils</span></a></span><span>
</span><span id="line-31"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="Distribution.System.html"><span class="hs-identifier">Distribution.System</span></a></span><span>
</span><span id="line-32"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="Distribution.TestSuite.html"><span class="hs-identifier">Distribution.TestSuite</span></a></span><span>
</span><span id="line-33"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="Distribution.Pretty.html"><span class="hs-identifier">Distribution.Pretty</span></a></span><span>
</span><span id="line-34"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="Distribution.Verbosity.html"><span class="hs-identifier">Distribution.Verbosity</span></a></span><span>
</span><span id="line-35"></span><span>
</span><span id="line-36"></span><span class="hs-keyword">import</span><span> </span><span class="hs-keyword">qualified</span><span> </span><span class="annot"><a href="../../base/src/Control.Exception.html#"><span class="hs-identifier">Control.Exception</span></a></span><span> </span><span class="hs-keyword">as</span><span> </span><span class="annot"><span class="hs-identifier">CE</span></span><span>
</span><span id="line-37"></span><span class="hs-keyword">import</span><span> </span><span class="hs-keyword">qualified</span><span> </span><span class="annot"><a href="../../bytestring/src/Data.ByteString.Lazy.html#"><span class="hs-identifier">Data.ByteString.Lazy</span></a></span><span> </span><span class="hs-keyword">as</span><span> </span><span class="annot"><span class="hs-identifier">LBS</span></span><span>
</span><span id="line-38"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="../../directory/src/System.Directory.html#"><span class="hs-identifier">System.Directory</span></a></span><span>
</span><span id="line-39"></span><span>    </span><span class="hs-special">(</span><span> </span><span class="annot"><a href="../../directory/src/System.Directory.html#createDirectoryIfMissing"><span class="hs-identifier">createDirectoryIfMissing</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="../../directory/src/System.Directory.html#canonicalizePath"><span class="hs-identifier">canonicalizePath</span></a></span><span>
</span><span id="line-40"></span><span>    </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="../../directory/src/System.Directory.html#doesDirectoryExist"><span class="hs-identifier">doesDirectoryExist</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="../../directory/src/System.Directory.html#doesFileExist"><span class="hs-identifier">doesFileExist</span></a></span><span>
</span><span id="line-41"></span><span>    </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="../../directory/src/System.Directory.html#getCurrentDirectory"><span class="hs-identifier">getCurrentDirectory</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="../../directory/src/System.Directory.html#removeDirectoryRecursive"><span class="hs-identifier">removeDirectoryRecursive</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="../../directory/src/System.Directory.html#removeFile"><span class="hs-identifier">removeFile</span></a></span><span>
</span><span id="line-42"></span><span>    </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="../../directory/src/System.Directory.html#setCurrentDirectory"><span class="hs-identifier">setCurrentDirectory</span></a></span><span> </span><span class="hs-special">)</span><span>
</span><span id="line-43"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="../../filepath/src/System.FilePath.html#"><span class="hs-identifier">System.FilePath</span></a></span><span> </span><span class="hs-special">(</span><span> </span><span class="annot"><a href="../../filepath/src/System.FilePath.Windows.html#%3C%2F%3E"><span class="hs-operator">(&lt;/&gt;)</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="../../filepath/src/System.FilePath.Windows.html#%3C.%3E"><span class="hs-operator">(&lt;.&gt;)</span></a></span><span> </span><span class="hs-special">)</span><span>
</span><span id="line-44"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="../../base/src/System.IO.html#"><span class="hs-identifier">System.IO</span></a></span><span> </span><span class="hs-special">(</span><span> </span><span class="annot"><a href="../../base/src/GHC.IO.Handle.html#hClose"><span class="hs-identifier">hClose</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="../../base/src/GHC.IO.Handle.Text.html#hPutStr"><span class="hs-identifier">hPutStr</span></a></span><span> </span><span class="hs-special">)</span><span>
</span><span id="line-45"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="../../process/src/System.Process.html#"><span class="hs-identifier">System.Process</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="../../process/src/System.Process.Common.html#StdStream"><span class="hs-identifier">StdStream</span></a></span><span class="hs-special">(</span><span class="hs-glyph">..</span><span class="hs-special">)</span><span class="hs-special">,</span><span> </span><span class="annot"><a href="../../process/src/System.Process.html#waitForProcess"><span class="hs-identifier">waitForProcess</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-46"></span><span>
</span><span id="line-47"></span><span class="annot"><a href="Distribution.Simple.Test.LibV09.html#runTest"><span class="hs-identifier hs-type">runTest</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="Distribution.Types.PackageDescription.html#PackageDescription"><span class="hs-identifier hs-type">PD.PackageDescription</span></a></span><span>
</span><span id="line-48"></span><span>        </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Distribution.Types.LocalBuildInfo.html#LocalBuildInfo"><span class="hs-identifier hs-type">LBI.LocalBuildInfo</span></a></span><span>
</span><span id="line-49"></span><span>        </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Distribution.Types.ComponentLocalBuildInfo.html#ComponentLocalBuildInfo"><span class="hs-identifier hs-type">LBI.ComponentLocalBuildInfo</span></a></span><span>
</span><span id="line-50"></span><span>        </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Distribution.Simple.Setup.html#TestFlags"><span class="hs-identifier hs-type">TestFlags</span></a></span><span>
</span><span id="line-51"></span><span>        </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Distribution.Types.TestSuite.html#TestSuite"><span class="hs-identifier hs-type">PD.TestSuite</span></a></span><span>
</span><span id="line-52"></span><span>        </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">IO</span></span><span> </span><span class="annot"><a href="Distribution.Simple.Test.Log.html#TestSuiteLog"><span class="hs-identifier hs-type">TestSuiteLog</span></a></span><span>
</span><span id="line-53"></span><span id="runTest"><span class="annot"><span class="annottext">runTest :: PackageDescription
-&gt; LocalBuildInfo
-&gt; ComponentLocalBuildInfo
-&gt; TestFlags
-&gt; TestSuite
-&gt; IO TestSuiteLog
</span><a href="Distribution.Simple.Test.LibV09.html#runTest"><span class="hs-identifier hs-var hs-var">runTest</span></a></span></span><span> </span><span id="local-6989586621679715117"><span class="annot"><span class="annottext">PackageDescription
</span><a href="#local-6989586621679715117"><span class="hs-identifier hs-var">pkg_descr</span></a></span></span><span> </span><span id="local-6989586621679715116"><span class="annot"><span class="annottext">LocalBuildInfo
</span><a href="#local-6989586621679715116"><span class="hs-identifier hs-var">lbi</span></a></span></span><span> </span><span id="local-6989586621679715115"><span class="annot"><span class="annottext">ComponentLocalBuildInfo
</span><a href="#local-6989586621679715115"><span class="hs-identifier hs-var">clbi</span></a></span></span><span> </span><span id="local-6989586621679715114"><span class="annot"><span class="annottext">TestFlags
</span><a href="#local-6989586621679715114"><span class="hs-identifier hs-var">flags</span></a></span></span><span> </span><span id="local-6989586621679715113"><span class="annot"><span class="annottext">TestSuite
</span><a href="#local-6989586621679715113"><span class="hs-identifier hs-var">suite</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">do</span><span>
</span><span id="line-54"></span><span>    </span><span class="hs-keyword">let</span><span> </span><span id="local-6989586621679715112"><span class="annot"><span class="annottext">isCoverageEnabled :: Bool
</span><a href="#local-6989586621679715112"><span class="hs-identifier hs-var hs-var">isCoverageEnabled</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">LocalBuildInfo -&gt; Bool
</span><a href="Distribution.Types.LocalBuildInfo.html#testCoverage"><span class="hs-identifier hs-var">LBI.testCoverage</span></a></span><span> </span><span class="annot"><span class="annottext">LocalBuildInfo
</span><a href="#local-6989586621679715116"><span class="hs-identifier hs-var">lbi</span></a></span><span>
</span><span id="line-55"></span><span>        </span><span id="local-6989586621679715110"><span class="annot"><span class="annottext">way :: Way
</span><a href="#local-6989586621679715110"><span class="hs-identifier hs-var hs-var">way</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">LocalBuildInfo -&gt; Way
</span><a href="Distribution.Simple.Hpc.html#guessWay"><span class="hs-identifier hs-var">guessWay</span></a></span><span> </span><span class="annot"><span class="annottext">LocalBuildInfo
</span><a href="#local-6989586621679715116"><span class="hs-identifier hs-var">lbi</span></a></span><span>
</span><span id="line-56"></span><span>
</span><span id="line-57"></span><span>    </span><span id="local-6989586621679715108"><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679715108"><span class="hs-identifier hs-var">pwd</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">IO String
</span><a href="../../directory/src/System.Directory.html#getCurrentDirectory"><span class="hs-identifier hs-var">getCurrentDirectory</span></a></span><span>
</span><span id="line-58"></span><span>    </span><span id="local-6989586621679715107"><span class="annot"><span class="annottext">[(String, String)]
</span><a href="#local-6989586621679715107"><span class="hs-identifier hs-var">existingEnv</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">IO [(String, String)]
</span><a href="Distribution.Compat.Environment.html#getEnvironment"><span class="hs-identifier hs-var">getEnvironment</span></a></span><span>
</span><span id="line-59"></span><span>
</span><span id="line-60"></span><span>    </span><span class="hs-keyword">let</span><span> </span><span id="local-6989586621679715105"><span class="annot"><span class="annottext">cmd :: String
</span><a href="#local-6989586621679715105"><span class="hs-identifier hs-var hs-var">cmd</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">LocalBuildInfo -&gt; String
</span><a href="Distribution.Types.LocalBuildInfo.html#buildDir"><span class="hs-identifier hs-var hs-var">LBI.buildDir</span></a></span><span> </span><span class="annot"><span class="annottext">LocalBuildInfo
</span><a href="#local-6989586621679715116"><span class="hs-identifier hs-var">lbi</span></a></span><span> </span><span class="annot"><span class="annottext">String -&gt; String -&gt; String
</span><a href="../../filepath/src/System.FilePath.Windows.html#%3C%2F%3E"><span class="hs-operator hs-var">&lt;/&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">TestSuite -&gt; String
</span><a href="Distribution.Simple.Test.LibV09.html#stubName"><span class="hs-identifier hs-var">stubName</span></a></span><span> </span><span class="annot"><span class="annottext">TestSuite
</span><a href="#local-6989586621679715113"><span class="hs-identifier hs-var">suite</span></a></span><span>
</span><span id="line-61"></span><span>                  </span><span class="annot"><span class="annottext">String -&gt; String -&gt; String
</span><a href="../../filepath/src/System.FilePath.Windows.html#%3C%2F%3E"><span class="hs-operator hs-var">&lt;/&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">TestSuite -&gt; String
</span><a href="Distribution.Simple.Test.LibV09.html#stubName"><span class="hs-identifier hs-var">stubName</span></a></span><span> </span><span class="annot"><span class="annottext">TestSuite
</span><a href="#local-6989586621679715113"><span class="hs-identifier hs-var">suite</span></a></span><span> </span><span class="annot"><span class="annottext">String -&gt; String -&gt; String
</span><a href="../../filepath/src/System.FilePath.Windows.html#%3C.%3E"><span class="hs-operator hs-var">&lt;.&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">Platform -&gt; String
</span><a href="Distribution.Simple.BuildPaths.html#exeExtension"><span class="hs-identifier hs-var">exeExtension</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">LocalBuildInfo -&gt; Platform
</span><a href="Distribution.Types.LocalBuildInfo.html#hostPlatform"><span class="hs-identifier hs-var hs-var">LBI.hostPlatform</span></a></span><span> </span><span class="annot"><span class="annottext">LocalBuildInfo
</span><a href="#local-6989586621679715116"><span class="hs-identifier hs-var">lbi</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-62"></span><span>    </span><span class="hs-comment">-- Check that the test executable exists.</span><span>
</span><span id="line-63"></span><span>    </span><span id="local-6989586621679715101"><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621679715101"><span class="hs-identifier hs-var">exists</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">String -&gt; IO Bool
</span><a href="../../directory/src/System.Directory.html#doesFileExist"><span class="hs-identifier hs-var">doesFileExist</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679715105"><span class="hs-identifier hs-var">cmd</span></a></span><span>
</span><span id="line-64"></span><span>    </span><span class="annot"><span class="annottext">Bool -&gt; IO () -&gt; IO ()
forall (f :: * -&gt; *). Applicative f =&gt; Bool -&gt; f () -&gt; f ()
</span><a href="../../base/src/Control.Monad.html#unless"><span class="hs-identifier hs-var">unless</span></a></span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621679715101"><span class="hs-identifier hs-var">exists</span></a></span><span> </span><span class="annot"><span class="annottext">(IO () -&gt; IO ()) -&gt; IO () -&gt; IO ()
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span>
</span><span id="line-65"></span><span>      </span><span class="annot"><span class="annottext">Verbosity -&gt; String -&gt; IO ()
forall a. Verbosity -&gt; String -&gt; IO a
</span><a href="Distribution.Simple.Utils.html#die%27"><span class="hs-identifier hs-var">die'</span></a></span><span> </span><span class="annot"><span class="annottext">Verbosity
</span><a href="#local-6989586621679715098"><span class="hs-identifier hs-var">verbosity</span></a></span><span> </span><span class="annot"><span class="annottext">(String -&gt; IO ()) -&gt; String -&gt; IO ()
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;Error: Could not find test program \&quot;&quot;</span></span><span> </span><span class="annot"><span class="annottext">String -&gt; String -&gt; String
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679715105"><span class="hs-identifier hs-var">cmd</span></a></span><span>
</span><span id="line-66"></span><span>                    </span><span class="annot"><span class="annottext">String -&gt; String -&gt; String
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;\&quot;. Did you build the package first?&quot;</span></span><span>
</span><span id="line-67"></span><span>
</span><span id="line-68"></span><span>    </span><span class="hs-comment">-- Remove old .tix files if appropriate.</span><span>
</span><span id="line-69"></span><span>    </span><span class="annot"><span class="annottext">Bool -&gt; IO () -&gt; IO ()
forall (f :: * -&gt; *). Applicative f =&gt; Bool -&gt; f () -&gt; f ()
</span><a href="../../base/src/Control.Monad.html#unless"><span class="hs-identifier hs-var">unless</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Flag Bool -&gt; Bool
forall a. WithCallStack (Flag a -&gt; a)
</span><a href="Distribution.Simple.Flag.html#fromFlag"><span class="hs-identifier hs-var">fromFlag</span></a></span><span> </span><span class="annot"><span class="annottext">(Flag Bool -&gt; Bool) -&gt; Flag Bool -&gt; Bool
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">TestFlags -&gt; Flag Bool
</span><a href="Distribution.Simple.Setup.html#testKeepTix"><span class="hs-identifier hs-var hs-var">testKeepTix</span></a></span><span> </span><span class="annot"><span class="annottext">TestFlags
</span><a href="#local-6989586621679715114"><span class="hs-identifier hs-var">flags</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">(IO () -&gt; IO ()) -&gt; IO () -&gt; IO ()
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="hs-keyword">do</span><span>
</span><span id="line-70"></span><span>        </span><span class="hs-keyword">let</span><span> </span><span id="local-6989586621679715095"><span class="annot"><span class="annottext">tDir :: String
</span><a href="#local-6989586621679715095"><span class="hs-identifier hs-var hs-var">tDir</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">String -&gt; Way -&gt; String -&gt; String
</span><a href="Distribution.Simple.Hpc.html#tixDir"><span class="hs-identifier hs-var">tixDir</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679715093"><span class="hs-identifier hs-var">distPref</span></a></span><span> </span><span class="annot"><span class="annottext">Way
</span><a href="#local-6989586621679715110"><span class="hs-identifier hs-var">way</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679715092"><span class="hs-identifier hs-var">testName'</span></a></span><span>
</span><span id="line-71"></span><span>        </span><span id="local-6989586621679715091"><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621679715091"><span class="hs-identifier hs-var">exists'</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">String -&gt; IO Bool
</span><a href="../../directory/src/System.Directory.html#doesDirectoryExist"><span class="hs-identifier hs-var">doesDirectoryExist</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679715095"><span class="hs-identifier hs-var">tDir</span></a></span><span>
</span><span id="line-72"></span><span>        </span><span class="annot"><span class="annottext">Bool -&gt; IO () -&gt; IO ()
forall (f :: * -&gt; *). Applicative f =&gt; Bool -&gt; f () -&gt; f ()
</span><a href="../../base/src/GHC.Base.html#when"><span class="hs-identifier hs-var">when</span></a></span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621679715091"><span class="hs-identifier hs-var">exists'</span></a></span><span> </span><span class="annot"><span class="annottext">(IO () -&gt; IO ()) -&gt; IO () -&gt; IO ()
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">String -&gt; IO ()
</span><a href="../../directory/src/System.Directory.html#removeDirectoryRecursive"><span class="hs-identifier hs-var">removeDirectoryRecursive</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679715095"><span class="hs-identifier hs-var">tDir</span></a></span><span>
</span><span id="line-73"></span><span>
</span><span id="line-74"></span><span>    </span><span class="hs-comment">-- Create directory for HPC files.</span><span>
</span><span id="line-75"></span><span>    </span><span class="annot"><span class="annottext">Bool -&gt; String -&gt; IO ()
</span><a href="../../directory/src/System.Directory.html#createDirectoryIfMissing"><span class="hs-identifier hs-var">createDirectoryIfMissing</span></a></span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier hs-var">True</span></span><span> </span><span class="annot"><span class="annottext">(String -&gt; IO ()) -&gt; String -&gt; IO ()
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">String -&gt; Way -&gt; String -&gt; String
</span><a href="Distribution.Simple.Hpc.html#tixDir"><span class="hs-identifier hs-var">tixDir</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679715093"><span class="hs-identifier hs-var">distPref</span></a></span><span> </span><span class="annot"><span class="annottext">Way
</span><a href="#local-6989586621679715110"><span class="hs-identifier hs-var">way</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679715092"><span class="hs-identifier hs-var">testName'</span></a></span><span>
</span><span id="line-76"></span><span>
</span><span id="line-77"></span><span>    </span><span class="hs-comment">-- Write summary notices indicating start of test suite</span><span>
</span><span id="line-78"></span><span>    </span><span class="annot"><span class="annottext">Verbosity -&gt; String -&gt; IO ()
</span><a href="Distribution.Simple.Utils.html#notice"><span class="hs-identifier hs-var">notice</span></a></span><span> </span><span class="annot"><span class="annottext">Verbosity
</span><a href="#local-6989586621679715098"><span class="hs-identifier hs-var">verbosity</span></a></span><span> </span><span class="annot"><span class="annottext">(String -&gt; IO ()) -&gt; String -&gt; IO ()
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">String -&gt; String
</span><a href="Distribution.Simple.Test.Log.html#summarizeSuiteStart"><span class="hs-identifier hs-var">summarizeSuiteStart</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679715092"><span class="hs-identifier hs-var">testName'</span></a></span><span>
</span><span id="line-79"></span><span>
</span><span id="line-80"></span><span>    </span><span id="local-6989586621679715087"><span class="annot"><span class="annottext">TestSuiteLog
</span><a href="#local-6989586621679715087"><span class="hs-identifier hs-var">suiteLog</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">IO String
-&gt; (String -&gt; IO ())
-&gt; (String -&gt; IO TestSuiteLog)
-&gt; IO TestSuiteLog
forall a b c. IO a -&gt; (a -&gt; IO b) -&gt; (a -&gt; IO c) -&gt; IO c
</span><a href="../../base/src/Control.Exception.Base.html#bracket"><span class="hs-identifier hs-var">CE.bracket</span></a></span><span> </span><span class="annot"><span class="annottext">IO String
</span><a href="#local-6989586621679715085"><span class="hs-identifier hs-var">openCabalTemp</span></a></span><span> </span><span class="annot"><span class="annottext">String -&gt; IO ()
</span><a href="#local-6989586621679715084"><span class="hs-identifier hs-var">deleteIfExists</span></a></span><span> </span><span class="annot"><span class="annottext">((String -&gt; IO TestSuiteLog) -&gt; IO TestSuiteLog)
-&gt; (String -&gt; IO TestSuiteLog) -&gt; IO TestSuiteLog
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="hs-glyph">\</span><span id="local-6989586621679715083"><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679715083"><span class="hs-identifier hs-var">tempLog</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-keyword">do</span><span>
</span><span id="line-81"></span><span>
</span><span id="line-82"></span><span>        </span><span class="hs-comment">-- TODO: this setup is broken,</span><span>
</span><span id="line-83"></span><span>        </span><span class="hs-comment">-- if the test output is too big, we will deadlock.</span><span>
</span><span id="line-84"></span><span>        </span><span class="hs-special">(</span><span id="local-6989586621679715082"><span class="annot"><span class="annottext">Handle
</span><a href="#local-6989586621679715082"><span class="hs-identifier hs-var">rOut</span></a></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621679715081"><span class="annot"><span class="annottext">Handle
</span><a href="#local-6989586621679715081"><span class="hs-identifier hs-var">wOut</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">IO (Handle, Handle)
</span><a href="../../process/src/System.Process.Internals.html#createPipe"><span class="hs-identifier hs-var">createPipe</span></a></span><span>
</span><span id="line-85"></span><span>
</span><span id="line-86"></span><span>        </span><span class="hs-comment">-- Run test executable</span><span>
</span><span id="line-87"></span><span>        </span><span class="hs-special">(</span><span class="annot"><a href="../../base/src/GHC.Maybe.html#Just"><span class="hs-identifier hs-type">Just</span></a></span><span> </span><span id="local-6989586621679715079"><span class="annot"><span class="annottext">Handle
</span><a href="#local-6989586621679715079"><span class="hs-identifier hs-var">wIn</span></a></span></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">Maybe Handle
</span><span class="hs-identifier">_</span></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">Maybe Handle
</span><span class="hs-identifier">_</span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621679715078"><span class="annot"><span class="annottext">ProcessHandle
</span><a href="#local-6989586621679715078"><span class="hs-identifier hs-var">process</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="hs-keyword">do</span><span>
</span><span id="line-88"></span><span>                </span><span class="hs-keyword">let</span><span> </span><span id="local-6989586621679715077"><span class="annot"><span class="annottext">opts :: [String]
</span><a href="#local-6989586621679715077"><span class="hs-identifier hs-var hs-var">opts</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(PathTemplate -&gt; String) -&gt; [PathTemplate] -&gt; [String]
forall a b. (a -&gt; b) -&gt; [a] -&gt; [b]
</span><a href="../../base/src/GHC.Base.html#map"><span class="hs-identifier hs-var">map</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">PackageDescription
-&gt; LocalBuildInfo -&gt; TestSuite -&gt; PathTemplate -&gt; String
</span><a href="Distribution.Simple.Test.LibV09.html#testOption"><span class="hs-identifier hs-var">testOption</span></a></span><span> </span><span class="annot"><span class="annottext">PackageDescription
</span><a href="#local-6989586621679715117"><span class="hs-identifier hs-var">pkg_descr</span></a></span><span> </span><span class="annot"><span class="annottext">LocalBuildInfo
</span><a href="#local-6989586621679715116"><span class="hs-identifier hs-var">lbi</span></a></span><span> </span><span class="annot"><span class="annottext">TestSuite
</span><a href="#local-6989586621679715113"><span class="hs-identifier hs-var">suite</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">([PathTemplate] -&gt; [String]) -&gt; [PathTemplate] -&gt; [String]
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">TestFlags -&gt; [PathTemplate]
</span><a href="Distribution.Simple.Setup.html#testOptions"><span class="hs-identifier hs-var hs-var">testOptions</span></a></span><span> </span><span class="annot"><span class="annottext">TestFlags
</span><a href="#local-6989586621679715114"><span class="hs-identifier hs-var">flags</span></a></span><span>
</span><span id="line-89"></span><span>                    </span><span id="local-6989586621679715074"><span class="annot"><span class="annottext">dataDirPath :: String
</span><a href="#local-6989586621679715074"><span class="hs-identifier hs-var hs-var">dataDirPath</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679715108"><span class="hs-identifier hs-var">pwd</span></a></span><span> </span><span class="annot"><span class="annottext">String -&gt; String -&gt; String
</span><a href="../../filepath/src/System.FilePath.Windows.html#%3C%2F%3E"><span class="hs-operator hs-var">&lt;/&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">PackageDescription -&gt; String
</span><a href="Distribution.Types.PackageDescription.html#dataDir"><span class="hs-identifier hs-var hs-var">PD.dataDir</span></a></span><span> </span><span class="annot"><span class="annottext">PackageDescription
</span><a href="#local-6989586621679715117"><span class="hs-identifier hs-var">pkg_descr</span></a></span><span>
</span><span id="line-90"></span><span>                    </span><span id="local-6989586621679715072"><span class="annot"><span class="annottext">tixFile :: String
</span><a href="#local-6989586621679715072"><span class="hs-identifier hs-var hs-var">tixFile</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679715108"><span class="hs-identifier hs-var">pwd</span></a></span><span> </span><span class="annot"><span class="annottext">String -&gt; String -&gt; String
</span><a href="../../filepath/src/System.FilePath.Windows.html#%3C%2F%3E"><span class="hs-operator hs-var">&lt;/&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">String -&gt; Way -&gt; String -&gt; String
</span><a href="Distribution.Simple.Hpc.html#tixFilePath"><span class="hs-identifier hs-var">tixFilePath</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679715093"><span class="hs-identifier hs-var">distPref</span></a></span><span> </span><span class="annot"><span class="annottext">Way
</span><a href="#local-6989586621679715110"><span class="hs-identifier hs-var">way</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679715092"><span class="hs-identifier hs-var">testName'</span></a></span><span>
</span><span id="line-91"></span><span>                    </span><span id="local-6989586621679715070"><span class="annot"><span class="annottext">pkgPathEnv :: [(String, String)]
</span><a href="#local-6989586621679715070"><span class="hs-identifier hs-var hs-var">pkgPathEnv</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">PackageDescription -&gt; String -&gt; String
</span><a href="Distribution.Simple.Build.PathsModule.html#pkgPathEnvVar"><span class="hs-identifier hs-var">pkgPathEnvVar</span></a></span><span> </span><span class="annot"><span class="annottext">PackageDescription
</span><a href="#local-6989586621679715117"><span class="hs-identifier hs-var">pkg_descr</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;datadir&quot;</span></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679715074"><span class="hs-identifier hs-var">dataDirPath</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-92"></span><span>                               </span><span class="annot"><span class="annottext">(String, String) -&gt; [(String, String)] -&gt; [(String, String)]
forall a. a -&gt; [a] -&gt; [a]
</span><span class="hs-glyph hs-var">:</span></span><span> </span><span class="annot"><span class="annottext">[(String, String)]
</span><a href="#local-6989586621679715107"><span class="hs-identifier hs-var">existingEnv</span></a></span><span>
</span><span id="line-93"></span><span>                    </span><span id="local-6989586621679715068"><span class="annot"><span class="annottext">shellEnv :: [(String, String)]
</span><a href="#local-6989586621679715068"><span class="hs-identifier hs-var hs-var">shellEnv</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">[</span><span class="hs-special">(</span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;HPCTIXFILE&quot;</span></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679715072"><span class="hs-identifier hs-var">tixFile</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621679715112"><span class="hs-identifier hs-var">isCoverageEnabled</span></a></span><span class="hs-special">]</span><span>
</span><span id="line-94"></span><span>                             </span><span class="annot"><span class="annottext">[(String, String)] -&gt; [(String, String)] -&gt; [(String, String)]
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span> </span><span class="annot"><span class="annottext">[(String, String)]
</span><a href="#local-6989586621679715070"><span class="hs-identifier hs-var">pkgPathEnv</span></a></span><span>
</span><span id="line-95"></span><span>                </span><span class="hs-comment">-- Add (DY)LD_LIBRARY_PATH if needed</span><span>
</span><span id="line-96"></span><span>                </span><span id="local-6989586621679715067"><span class="annot"><span class="annottext">[(String, String)]
</span><a href="#local-6989586621679715067"><span class="hs-identifier hs-var">shellEnv'</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span>
</span><span id="line-97"></span><span>                  </span><span class="hs-keyword">if</span><span> </span><span class="annot"><span class="annottext">LocalBuildInfo -&gt; Bool
</span><a href="Distribution.Types.LocalBuildInfo.html#withDynExe"><span class="hs-identifier hs-var hs-var">LBI.withDynExe</span></a></span><span> </span><span class="annot"><span class="annottext">LocalBuildInfo
</span><a href="#local-6989586621679715116"><span class="hs-identifier hs-var">lbi</span></a></span><span>
</span><span id="line-98"></span><span>                  </span><span class="hs-keyword">then</span><span> </span><span class="hs-keyword">do</span><span>
</span><span id="line-99"></span><span>                    </span><span class="hs-keyword">let</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Distribution.System.html#Platform"><span class="hs-identifier hs-type">Platform</span></a></span><span> </span><span class="annot"><span class="annottext">Arch
</span><span class="hs-identifier">_</span></span><span> </span><span id="local-6989586621679715064"><span class="annot"><span class="annottext">OS
</span><a href="#local-6989586621679715064"><span class="hs-identifier hs-var">os</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">LocalBuildInfo -&gt; Platform
</span><a href="Distribution.Types.LocalBuildInfo.html#hostPlatform"><span class="hs-identifier hs-var hs-var">LBI.hostPlatform</span></a></span><span> </span><span class="annot"><span class="annottext">LocalBuildInfo
</span><a href="#local-6989586621679715116"><span class="hs-identifier hs-var">lbi</span></a></span><span>
</span><span id="line-100"></span><span>                    </span><span id="local-6989586621679715063"><span class="annot"><span class="annottext">[String]
</span><a href="#local-6989586621679715063"><span class="hs-identifier hs-var">paths</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">Bool
-&gt; Bool -&gt; LocalBuildInfo -&gt; ComponentLocalBuildInfo -&gt; IO [String]
</span><a href="Distribution.Simple.LocalBuildInfo.html#depLibraryPaths"><span class="hs-identifier hs-var">LBI.depLibraryPaths</span></a></span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier hs-var">True</span></span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier hs-var">False</span></span><span> </span><span class="annot"><span class="annottext">LocalBuildInfo
</span><a href="#local-6989586621679715116"><span class="hs-identifier hs-var">lbi</span></a></span><span> </span><span class="annot"><span class="annottext">ComponentLocalBuildInfo
</span><a href="#local-6989586621679715115"><span class="hs-identifier hs-var">clbi</span></a></span><span>
</span><span id="line-101"></span><span>                    </span><span id="local-6989586621679715061"><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679715061"><span class="hs-identifier hs-var">cpath</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">String -&gt; IO String
</span><a href="../../directory/src/System.Directory.html#canonicalizePath"><span class="hs-identifier hs-var">canonicalizePath</span></a></span><span> </span><span class="annot"><span class="annottext">(String -&gt; IO String) -&gt; String -&gt; IO String
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">LocalBuildInfo -&gt; ComponentLocalBuildInfo -&gt; String
</span><a href="Distribution.Simple.LocalBuildInfo.html#componentBuildDir"><span class="hs-identifier hs-var">LBI.componentBuildDir</span></a></span><span> </span><span class="annot"><span class="annottext">LocalBuildInfo
</span><a href="#local-6989586621679715116"><span class="hs-identifier hs-var">lbi</span></a></span><span> </span><span class="annot"><span class="annottext">ComponentLocalBuildInfo
</span><a href="#local-6989586621679715115"><span class="hs-identifier hs-var">clbi</span></a></span><span>
</span><span id="line-102"></span><span>                    </span><span class="annot"><span class="annottext">[(String, String)] -&gt; IO [(String, String)]
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">OS -&gt; [String] -&gt; [(String, String)] -&gt; [(String, String)]
</span><a href="Distribution.Simple.Utils.html#addLibraryPath"><span class="hs-identifier hs-var">addLibraryPath</span></a></span><span> </span><span class="annot"><span class="annottext">OS
</span><a href="#local-6989586621679715064"><span class="hs-identifier hs-var">os</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679715061"><span class="hs-identifier hs-var">cpath</span></a></span><span> </span><span class="annot"><span class="annottext">String -&gt; [String] -&gt; [String]
forall a. a -&gt; [a] -&gt; [a]
</span><span class="hs-glyph hs-var">:</span></span><span> </span><span class="annot"><span class="annottext">[String]
</span><a href="#local-6989586621679715063"><span class="hs-identifier hs-var">paths</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">[(String, String)]
</span><a href="#local-6989586621679715068"><span class="hs-identifier hs-var">shellEnv</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-103"></span><span>                  </span><span class="hs-keyword">else</span><span> </span><span class="annot"><span class="annottext">[(String, String)] -&gt; IO [(String, String)]
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="annot"><span class="annottext">[(String, String)]
</span><a href="#local-6989586621679715068"><span class="hs-identifier hs-var">shellEnv</span></a></span><span>
</span><span id="line-104"></span><span>                </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">TestFlags -&gt; Flag String
</span><a href="Distribution.Simple.Setup.html#testWrapper"><span class="hs-identifier hs-var hs-var">testWrapper</span></a></span><span> </span><span class="annot"><span class="annottext">TestFlags
</span><a href="#local-6989586621679715114"><span class="hs-identifier hs-var">flags</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-105"></span><span>                  </span><span class="annot"><a href="Distribution.Simple.Flag.html#Flag"><span class="hs-identifier hs-type">Flag</span></a></span><span> </span><span id="local-6989586621679715056"><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679715056"><span class="hs-identifier hs-var">path</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Verbosity
-&gt; String
-&gt; [String]
-&gt; Maybe String
-&gt; Maybe [(String, String)]
-&gt; StdStream
-&gt; StdStream
-&gt; StdStream
-&gt; IO (Maybe Handle, Maybe Handle, Maybe Handle, ProcessHandle)
</span><a href="Distribution.Simple.Utils.html#createProcessWithEnv"><span class="hs-identifier hs-var">createProcessWithEnv</span></a></span><span> </span><span class="annot"><span class="annottext">Verbosity
</span><a href="#local-6989586621679715098"><span class="hs-identifier hs-var">verbosity</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679715056"><span class="hs-identifier hs-var">path</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679715105"><span class="hs-identifier hs-var">cmd</span></a></span><span class="annot"><span class="annottext">String -&gt; [String] -&gt; [String]
forall a. a -&gt; [a] -&gt; [a]
</span><span class="hs-glyph hs-var">:</span></span><span class="annot"><span class="annottext">[String]
</span><a href="#local-6989586621679715077"><span class="hs-identifier hs-var">opts</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">Maybe String
forall a. Maybe a
</span><a href="../../base/src/GHC.Maybe.html#Nothing"><span class="hs-identifier hs-var">Nothing</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">[(String, String)] -&gt; Maybe [(String, String)]
forall a. a -&gt; Maybe a
</span><a href="../../base/src/GHC.Maybe.html#Just"><span class="hs-identifier hs-var">Just</span></a></span><span> </span><span class="annot"><span class="annottext">[(String, String)]
</span><a href="#local-6989586621679715067"><span class="hs-identifier hs-var">shellEnv'</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-106"></span><span>                               </span><span class="hs-comment">-- these handles are closed automatically</span><span>
</span><span id="line-107"></span><span>                               </span><span class="annot"><span class="annottext">StdStream
</span><a href="../../process/src/System.Process.Common.html#CreatePipe"><span class="hs-identifier hs-var">CreatePipe</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Handle -&gt; StdStream
</span><a href="../../process/src/System.Process.Common.html#UseHandle"><span class="hs-identifier hs-var">UseHandle</span></a></span><span> </span><span class="annot"><span class="annottext">Handle
</span><a href="#local-6989586621679715081"><span class="hs-identifier hs-var">wOut</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Handle -&gt; StdStream
</span><a href="../../process/src/System.Process.Common.html#UseHandle"><span class="hs-identifier hs-var">UseHandle</span></a></span><span> </span><span class="annot"><span class="annottext">Handle
</span><a href="#local-6989586621679715081"><span class="hs-identifier hs-var">wOut</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-108"></span><span>
</span><span id="line-109"></span><span>                  </span><span class="annot"><span class="annottext">Flag String
</span><a href="Distribution.Simple.Flag.html#NoFlag"><span class="hs-identifier hs-var">NoFlag</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Verbosity
-&gt; String
-&gt; [String]
-&gt; Maybe String
-&gt; Maybe [(String, String)]
-&gt; StdStream
-&gt; StdStream
-&gt; StdStream
-&gt; IO (Maybe Handle, Maybe Handle, Maybe Handle, ProcessHandle)
</span><a href="Distribution.Simple.Utils.html#createProcessWithEnv"><span class="hs-identifier hs-var">createProcessWithEnv</span></a></span><span> </span><span class="annot"><span class="annottext">Verbosity
</span><a href="#local-6989586621679715098"><span class="hs-identifier hs-var">verbosity</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679715105"><span class="hs-identifier hs-var">cmd</span></a></span><span> </span><span class="annot"><span class="annottext">[String]
</span><a href="#local-6989586621679715077"><span class="hs-identifier hs-var">opts</span></a></span><span> </span><span class="annot"><span class="annottext">Maybe String
forall a. Maybe a
</span><a href="../../base/src/GHC.Maybe.html#Nothing"><span class="hs-identifier hs-var">Nothing</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">[(String, String)] -&gt; Maybe [(String, String)]
forall a. a -&gt; Maybe a
</span><a href="../../base/src/GHC.Maybe.html#Just"><span class="hs-identifier hs-var">Just</span></a></span><span> </span><span class="annot"><span class="annottext">[(String, String)]
</span><a href="#local-6989586621679715067"><span class="hs-identifier hs-var">shellEnv'</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-110"></span><span>                            </span><span class="hs-comment">-- these handles are closed automatically</span><span>
</span><span id="line-111"></span><span>                            </span><span class="annot"><span class="annottext">StdStream
</span><a href="../../process/src/System.Process.Common.html#CreatePipe"><span class="hs-identifier hs-var">CreatePipe</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Handle -&gt; StdStream
</span><a href="../../process/src/System.Process.Common.html#UseHandle"><span class="hs-identifier hs-var">UseHandle</span></a></span><span> </span><span class="annot"><span class="annottext">Handle
</span><a href="#local-6989586621679715081"><span class="hs-identifier hs-var">wOut</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Handle -&gt; StdStream
</span><a href="../../process/src/System.Process.Common.html#UseHandle"><span class="hs-identifier hs-var">UseHandle</span></a></span><span> </span><span class="annot"><span class="annottext">Handle
</span><a href="#local-6989586621679715081"><span class="hs-identifier hs-var">wOut</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-112"></span><span>
</span><span id="line-113"></span><span>        </span><span class="annot"><span class="annottext">Handle -&gt; String -&gt; IO ()
</span><a href="../../base/src/GHC.IO.Handle.Text.html#hPutStr"><span class="hs-identifier hs-var">hPutStr</span></a></span><span> </span><span class="annot"><span class="annottext">Handle
</span><a href="#local-6989586621679715079"><span class="hs-identifier hs-var">wIn</span></a></span><span> </span><span class="annot"><span class="annottext">(String -&gt; IO ()) -&gt; String -&gt; IO ()
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">(String, UnqualComponentName) -&gt; String
forall a. Show a =&gt; a -&gt; String
</span><a href="../../base/src/GHC.Show.html#show"><span class="hs-identifier hs-var">show</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679715083"><span class="hs-identifier hs-var">tempLog</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">TestSuite -&gt; UnqualComponentName
</span><a href="Distribution.Types.TestSuite.html#testName"><span class="hs-identifier hs-var hs-var">PD.testName</span></a></span><span> </span><span class="annot"><span class="annottext">TestSuite
</span><a href="#local-6989586621679715113"><span class="hs-identifier hs-var">suite</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-114"></span><span>        </span><span class="annot"><span class="annottext">Handle -&gt; IO ()
</span><a href="../../base/src/GHC.IO.Handle.html#hClose"><span class="hs-identifier hs-var">hClose</span></a></span><span> </span><span class="annot"><span class="annottext">Handle
</span><a href="#local-6989586621679715079"><span class="hs-identifier hs-var">wIn</span></a></span><span>
</span><span id="line-115"></span><span>
</span><span id="line-116"></span><span>        </span><span class="hs-comment">-- Append contents of temporary log file to the final human-</span><span>
</span><span id="line-117"></span><span>        </span><span class="hs-comment">-- readable log file</span><span>
</span><span id="line-118"></span><span>        </span><span id="local-6989586621679715049"><span class="annot"><span class="annottext">ByteString
</span><a href="#local-6989586621679715049"><span class="hs-identifier hs-var">logText</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">Handle -&gt; IO ByteString
</span><a href="../../bytestring/src/Data.ByteString.Lazy.html#hGetContents"><span class="hs-identifier hs-var">LBS.hGetContents</span></a></span><span> </span><span class="annot"><span class="annottext">Handle
</span><a href="#local-6989586621679715082"><span class="hs-identifier hs-var">rOut</span></a></span><span>
</span><span id="line-119"></span><span>        </span><span class="hs-comment">-- Force the IO manager to drain the test output pipe</span><span>
</span><span id="line-120"></span><span>        </span><span class="annot"><span class="annottext">ByteString
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">ByteString -&gt; IO ByteString
forall a. a -&gt; IO a
</span><a href="../../base/src/GHC.IO.html#evaluate"><span class="hs-identifier hs-var">evaluate</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">ByteString -&gt; ByteString
forall a. NFData a =&gt; a -&gt; a
</span><a href="../../deepseq/src/Control.DeepSeq.html#force"><span class="hs-identifier hs-var">force</span></a></span><span> </span><span class="annot"><span class="annottext">ByteString
</span><a href="#local-6989586621679715049"><span class="hs-identifier hs-var">logText</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-121"></span><span>
</span><span id="line-122"></span><span>        </span><span id="local-6989586621679715045"><span class="annot"><span class="annottext">ExitCode
</span><a href="#local-6989586621679715045"><span class="hs-identifier hs-var">exitcode</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">ProcessHandle -&gt; IO ExitCode
</span><a href="../../process/src/System.Process.html#waitForProcess"><span class="hs-identifier hs-var">waitForProcess</span></a></span><span> </span><span class="annot"><span class="annottext">ProcessHandle
</span><a href="#local-6989586621679715078"><span class="hs-identifier hs-var">process</span></a></span><span>
</span><span id="line-123"></span><span>        </span><span class="annot"><span class="annottext">Bool -&gt; IO () -&gt; IO ()
forall (f :: * -&gt; *). Applicative f =&gt; Bool -&gt; f () -&gt; f ()
</span><a href="../../base/src/Control.Monad.html#unless"><span class="hs-identifier hs-var">unless</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">ExitCode
</span><a href="#local-6989586621679715045"><span class="hs-identifier hs-var">exitcode</span></a></span><span> </span><span class="annot"><span class="annottext">ExitCode -&gt; ExitCode -&gt; Bool
forall a. Eq a =&gt; a -&gt; a -&gt; Bool
</span><span class="hs-operator hs-var">==</span></span><span> </span><span class="annot"><span class="annottext">ExitCode
</span><a href="../../base/src/GHC.IO.Exception.html#ExitSuccess"><span class="hs-identifier hs-var">ExitSuccess</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">(IO () -&gt; IO ()) -&gt; IO () -&gt; IO ()
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="hs-keyword">do</span><span>
</span><span id="line-124"></span><span>            </span><span class="annot"><span class="annottext">Verbosity -&gt; String -&gt; IO ()
</span><a href="Distribution.Simple.Utils.html#debug"><span class="hs-identifier hs-var">debug</span></a></span><span> </span><span class="annot"><span class="annottext">Verbosity
</span><a href="#local-6989586621679715098"><span class="hs-identifier hs-var">verbosity</span></a></span><span> </span><span class="annot"><span class="annottext">(String -&gt; IO ()) -&gt; String -&gt; IO ()
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679715105"><span class="hs-identifier hs-var">cmd</span></a></span><span> </span><span class="annot"><span class="annottext">String -&gt; String -&gt; String
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot; returned &quot;</span></span><span> </span><span class="annot"><span class="annottext">String -&gt; String -&gt; String
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span> </span><span class="annot"><span class="annottext">ExitCode -&gt; String
forall a. Show a =&gt; a -&gt; String
</span><a href="../../base/src/GHC.Show.html#show"><span class="hs-identifier hs-var">show</span></a></span><span> </span><span class="annot"><span class="annottext">ExitCode
</span><a href="#local-6989586621679715045"><span class="hs-identifier hs-var">exitcode</span></a></span><span>
</span><span id="line-125"></span><span>
</span><span id="line-126"></span><span>        </span><span class="hs-comment">-- Generate final log file name</span><span>
</span><span id="line-127"></span><span>        </span><span class="hs-keyword">let</span><span> </span><span id="local-6989586621679715040"><span class="annot"><span class="annottext">finalLogName :: TestSuiteLog -&gt; String
</span><a href="#local-6989586621679715040"><span class="hs-identifier hs-var hs-var">finalLogName</span></a></span></span><span> </span><span id="local-6989586621679715039"><span class="annot"><span class="annottext">TestSuiteLog
</span><a href="#local-6989586621679715039"><span class="hs-identifier hs-var">l</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679715038"><span class="hs-identifier hs-var">testLogDir</span></a></span><span>
</span><span id="line-128"></span><span>                             </span><span class="annot"><span class="annottext">String -&gt; String -&gt; String
</span><a href="../../filepath/src/System.FilePath.Windows.html#%3C%2F%3E"><span class="hs-operator hs-var">&lt;/&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">PathTemplate
-&gt; PackageDescription
-&gt; LocalBuildInfo
-&gt; String
-&gt; TestLogs
-&gt; String
</span><a href="Distribution.Simple.Test.Log.html#testSuiteLogPath"><span class="hs-identifier hs-var">testSuiteLogPath</span></a></span><span>
</span><span id="line-129"></span><span>                                 </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Flag PathTemplate -&gt; PathTemplate
forall a. WithCallStack (Flag a -&gt; a)
</span><a href="Distribution.Simple.Flag.html#fromFlag"><span class="hs-identifier hs-var">fromFlag</span></a></span><span> </span><span class="annot"><span class="annottext">(Flag PathTemplate -&gt; PathTemplate)
-&gt; Flag PathTemplate -&gt; PathTemplate
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">TestFlags -&gt; Flag PathTemplate
</span><a href="Distribution.Simple.Setup.html#testHumanLog"><span class="hs-identifier hs-var hs-var">testHumanLog</span></a></span><span> </span><span class="annot"><span class="annottext">TestFlags
</span><a href="#local-6989586621679715114"><span class="hs-identifier hs-var">flags</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">PackageDescription
</span><a href="#local-6989586621679715117"><span class="hs-identifier hs-var">pkg_descr</span></a></span><span> </span><span class="annot"><span class="annottext">LocalBuildInfo
</span><a href="#local-6989586621679715116"><span class="hs-identifier hs-var">lbi</span></a></span><span>
</span><span id="line-130"></span><span>                                 </span><span class="hs-special">(</span><span class="annot"><span class="annottext">UnqualComponentName -&gt; String
</span><a href="Distribution.Types.UnqualComponentName.html#unUnqualComponentName"><span class="hs-identifier hs-var">unUnqualComponentName</span></a></span><span> </span><span class="annot"><span class="annottext">(UnqualComponentName -&gt; String) -&gt; UnqualComponentName -&gt; String
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">TestSuiteLog -&gt; UnqualComponentName
</span><a href="Distribution.Simple.Test.Log.html#testSuiteName"><span class="hs-identifier hs-var hs-var">testSuiteName</span></a></span><span> </span><span class="annot"><span class="annottext">TestSuiteLog
</span><a href="#local-6989586621679715039"><span class="hs-identifier hs-var">l</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">TestSuiteLog -&gt; TestLogs
</span><a href="Distribution.Simple.Test.Log.html#testLogs"><span class="hs-identifier hs-var hs-var">testLogs</span></a></span><span> </span><span class="annot"><span class="annottext">TestSuiteLog
</span><a href="#local-6989586621679715039"><span class="hs-identifier hs-var">l</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-131"></span><span>        </span><span class="hs-comment">-- Generate TestSuiteLog from executable exit code and a machine-</span><span>
</span><span id="line-132"></span><span>        </span><span class="hs-comment">-- readable test log</span><span>
</span><span id="line-133"></span><span>        </span><span id="local-6989586621679715032"><span class="annot"><span class="annottext">TestSuiteLog
</span><a href="#local-6989586621679715032"><span class="hs-identifier hs-var">suiteLog</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">(String -&gt; TestSuiteLog) -&gt; IO String -&gt; IO TestSuiteLog
forall (f :: * -&gt; *) a b. Functor f =&gt; (a -&gt; b) -&gt; f a -&gt; f b
</span><a href="../../base/src/GHC.Base.html#fmap"><span class="hs-identifier hs-var">fmap</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-glyph">\</span><span id="local-6989586621679715031"><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679715031"><span class="hs-identifier hs-var">s</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">(</span><span class="hs-glyph">\</span><span id="local-6989586621679715030"><span class="annot"><span class="annottext">TestSuiteLog
</span><a href="#local-6989586621679715030"><span class="hs-identifier hs-var">l</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">TestSuiteLog
</span><a href="#local-6989586621679715030"><span class="hs-identifier hs-var">l</span></a></span><span> </span><span class="hs-special">{</span><span> </span><span class="annot"><span class="annottext">logFile :: String
</span><a href="Distribution.Simple.Test.Log.html#logFile"><span class="hs-identifier hs-var">logFile</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">TestSuiteLog -&gt; String
</span><a href="#local-6989586621679715040"><span class="hs-identifier hs-var">finalLogName</span></a></span><span> </span><span class="annot"><span class="annottext">TestSuiteLog
</span><a href="#local-6989586621679715030"><span class="hs-identifier hs-var">l</span></a></span><span> </span><span class="hs-special">}</span><span class="hs-special">)</span><span>
</span><span id="line-134"></span><span>                    </span><span class="annot"><span class="annottext">(TestSuiteLog -&gt; TestSuiteLog)
-&gt; (Maybe TestSuiteLog -&gt; TestSuiteLog)
-&gt; Maybe TestSuiteLog
-&gt; TestSuiteLog
forall b c a. (b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; c
</span><a href="../../base/src/GHC.Base.html#."><span class="hs-operator hs-var">.</span></a></span><span> </span><span class="annot"><span class="annottext">TestSuiteLog -&gt; Maybe TestSuiteLog -&gt; TestSuiteLog
forall a. a -&gt; Maybe a -&gt; a
</span><a href="../../base/src/Data.Maybe.html#fromMaybe"><span class="hs-identifier hs-var">fromMaybe</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">String -&gt; TestSuiteLog
forall a. HasCallStack =&gt; String -&gt; a
</span><a href="../../base/src/GHC.Err.html#error"><span class="hs-identifier hs-var">error</span></a></span><span> </span><span class="annot"><span class="annottext">(String -&gt; TestSuiteLog) -&gt; String -&gt; TestSuiteLog
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;panic! read @TestSuiteLog &quot;</span></span><span> </span><span class="annot"><span class="annottext">String -&gt; String -&gt; String
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span> </span><span class="annot"><span class="annottext">String -&gt; String
forall a. Show a =&gt; a -&gt; String
</span><a href="../../base/src/GHC.Show.html#show"><span class="hs-identifier hs-var">show</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679715031"><span class="hs-identifier hs-var">s</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">(Maybe TestSuiteLog -&gt; TestSuiteLog)
-&gt; Maybe TestSuiteLog -&gt; TestSuiteLog
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">String -&gt; Maybe TestSuiteLog
forall a. Read a =&gt; String -&gt; Maybe a
</span><a href="../../base/src/Text.Read.html#readMaybe"><span class="hs-identifier hs-var">readMaybe</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679715031"><span class="hs-identifier hs-var">s</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-comment">-- TODO: eradicateNoParse</span><span>
</span><span id="line-135"></span><span>                    </span><span class="annot"><span class="annottext">(IO String -&gt; IO TestSuiteLog) -&gt; IO String -&gt; IO TestSuiteLog
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">String -&gt; IO String
</span><a href="../../base/src/System.IO.html#readFile"><span class="hs-identifier hs-var">readFile</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679715083"><span class="hs-identifier hs-var">tempLog</span></a></span><span>
</span><span id="line-136"></span><span>
</span><span id="line-137"></span><span>        </span><span class="hs-comment">-- Write summary notice to log file indicating start of test suite</span><span>
</span><span id="line-138"></span><span>        </span><span class="annot"><span class="annottext">String -&gt; String -&gt; IO ()
</span><a href="../../base/src/System.IO.html#appendFile"><span class="hs-identifier hs-var">appendFile</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">TestSuiteLog -&gt; String
</span><a href="Distribution.Simple.Test.Log.html#logFile"><span class="hs-identifier hs-var hs-var">logFile</span></a></span><span> </span><span class="annot"><span class="annottext">TestSuiteLog
</span><a href="#local-6989586621679715032"><span class="hs-identifier hs-var">suiteLog</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">(String -&gt; IO ()) -&gt; String -&gt; IO ()
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">String -&gt; String
</span><a href="Distribution.Simple.Test.Log.html#summarizeSuiteStart"><span class="hs-identifier hs-var">summarizeSuiteStart</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679715092"><span class="hs-identifier hs-var">testName'</span></a></span><span>
</span><span id="line-139"></span><span>
</span><span id="line-140"></span><span>        </span><span class="annot"><span class="annottext">String -&gt; ByteString -&gt; IO ()
</span><a href="../../bytestring/src/Data.ByteString.Lazy.html#appendFile"><span class="hs-identifier hs-var">LBS.appendFile</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">TestSuiteLog -&gt; String
</span><a href="Distribution.Simple.Test.Log.html#logFile"><span class="hs-identifier hs-var hs-var">logFile</span></a></span><span> </span><span class="annot"><span class="annottext">TestSuiteLog
</span><a href="#local-6989586621679715032"><span class="hs-identifier hs-var">suiteLog</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">ByteString
</span><a href="#local-6989586621679715049"><span class="hs-identifier hs-var">logText</span></a></span><span>
</span><span id="line-141"></span><span>
</span><span id="line-142"></span><span>        </span><span class="hs-comment">-- Write end-of-suite summary notice to log file</span><span>
</span><span id="line-143"></span><span>        </span><span class="annot"><span class="annottext">String -&gt; String -&gt; IO ()
</span><a href="../../base/src/System.IO.html#appendFile"><span class="hs-identifier hs-var">appendFile</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">TestSuiteLog -&gt; String
</span><a href="Distribution.Simple.Test.Log.html#logFile"><span class="hs-identifier hs-var hs-var">logFile</span></a></span><span> </span><span class="annot"><span class="annottext">TestSuiteLog
</span><a href="#local-6989586621679715032"><span class="hs-identifier hs-var">suiteLog</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">(String -&gt; IO ()) -&gt; String -&gt; IO ()
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">TestSuiteLog -&gt; String
</span><a href="Distribution.Simple.Test.Log.html#summarizeSuiteFinish"><span class="hs-identifier hs-var">summarizeSuiteFinish</span></a></span><span> </span><span class="annot"><span class="annottext">TestSuiteLog
</span><a href="#local-6989586621679715032"><span class="hs-identifier hs-var">suiteLog</span></a></span><span>
</span><span id="line-144"></span><span>
</span><span id="line-145"></span><span>        </span><span class="hs-comment">-- Show the contents of the human-readable log file on the terminal</span><span>
</span><span id="line-146"></span><span>        </span><span class="hs-comment">-- if there is a failure and/or detailed output is requested</span><span>
</span><span id="line-147"></span><span>        </span><span class="hs-keyword">let</span><span> </span><span id="local-6989586621679715018"><span class="annot"><span class="annottext">details :: TestShowDetails
</span><a href="#local-6989586621679715018"><span class="hs-identifier hs-var hs-var">details</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Flag TestShowDetails -&gt; TestShowDetails
forall a. WithCallStack (Flag a -&gt; a)
</span><a href="Distribution.Simple.Flag.html#fromFlag"><span class="hs-identifier hs-var">fromFlag</span></a></span><span> </span><span class="annot"><span class="annottext">(Flag TestShowDetails -&gt; TestShowDetails)
-&gt; Flag TestShowDetails -&gt; TestShowDetails
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">TestFlags -&gt; Flag TestShowDetails
</span><a href="Distribution.Simple.Setup.html#testShowDetails"><span class="hs-identifier hs-var hs-var">testShowDetails</span></a></span><span> </span><span class="annot"><span class="annottext">TestFlags
</span><a href="#local-6989586621679715114"><span class="hs-identifier hs-var">flags</span></a></span><span>
</span><span id="line-148"></span><span>            </span><span id="local-6989586621679715009"><span class="annot"><span class="annottext">whenPrinting :: IO () -&gt; IO ()
</span><a href="#local-6989586621679715009"><span class="hs-identifier hs-var hs-var">whenPrinting</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Bool -&gt; IO () -&gt; IO ()
forall (f :: * -&gt; *). Applicative f =&gt; Bool -&gt; f () -&gt; f ()
</span><a href="../../base/src/GHC.Base.html#when"><span class="hs-identifier hs-var">when</span></a></span><span> </span><span class="annot"><span class="annottext">(Bool -&gt; IO () -&gt; IO ()) -&gt; Bool -&gt; IO () -&gt; IO ()
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">TestShowDetails
</span><a href="#local-6989586621679715018"><span class="hs-identifier hs-var">details</span></a></span><span> </span><span class="annot"><span class="annottext">TestShowDetails -&gt; TestShowDetails -&gt; Bool
forall a. Ord a =&gt; a -&gt; a -&gt; Bool
</span><span class="hs-operator hs-var">&gt;</span></span><span> </span><span class="annot"><span class="annottext">TestShowDetails
</span><a href="Distribution.Simple.Setup.html#Never"><span class="hs-identifier hs-var">Never</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-149"></span><span>                </span><span class="annot"><span class="annottext">Bool -&gt; Bool -&gt; Bool
</span><span class="hs-operator hs-var">&amp;&amp;</span></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Bool -&gt; Bool
</span><span class="hs-identifier hs-var">not</span></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">TestLogs -&gt; Bool
</span><a href="Distribution.Simple.Test.Log.html#suitePassed"><span class="hs-identifier hs-var">suitePassed</span></a></span><span> </span><span class="annot"><span class="annottext">(TestLogs -&gt; Bool) -&gt; TestLogs -&gt; Bool
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">TestSuiteLog -&gt; TestLogs
</span><a href="Distribution.Simple.Test.Log.html#testLogs"><span class="hs-identifier hs-var hs-var">testLogs</span></a></span><span> </span><span class="annot"><span class="annottext">TestSuiteLog
</span><a href="#local-6989586621679715032"><span class="hs-identifier hs-var">suiteLog</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">Bool -&gt; Bool -&gt; Bool
</span><span class="hs-operator hs-var">||</span></span><span> </span><span class="annot"><span class="annottext">TestShowDetails
</span><a href="#local-6989586621679715018"><span class="hs-identifier hs-var">details</span></a></span><span> </span><span class="annot"><span class="annottext">TestShowDetails -&gt; TestShowDetails -&gt; Bool
forall a. Eq a =&gt; a -&gt; a -&gt; Bool
</span><span class="hs-operator hs-var">==</span></span><span> </span><span class="annot"><span class="annottext">TestShowDetails
</span><a href="Distribution.Simple.Setup.html#Always"><span class="hs-identifier hs-var">Always</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-150"></span><span>                </span><span class="annot"><span class="annottext">Bool -&gt; Bool -&gt; Bool
</span><span class="hs-operator hs-var">&amp;&amp;</span></span><span> </span><span class="annot"><span class="annottext">Verbosity
</span><a href="#local-6989586621679715098"><span class="hs-identifier hs-var">verbosity</span></a></span><span> </span><span class="annot"><span class="annottext">Verbosity -&gt; Verbosity -&gt; Bool
forall a. Ord a =&gt; a -&gt; a -&gt; Bool
</span><span class="hs-operator hs-var">&gt;=</span></span><span> </span><span class="annot"><span class="annottext">Verbosity
</span><a href="Distribution.Verbosity.html#normal"><span class="hs-identifier hs-var">normal</span></a></span><span>
</span><span id="line-151"></span><span>        </span><span class="annot"><span class="annottext">IO () -&gt; IO ()
</span><a href="#local-6989586621679715009"><span class="hs-identifier hs-var">whenPrinting</span></a></span><span> </span><span class="annot"><span class="annottext">(IO () -&gt; IO ()) -&gt; IO () -&gt; IO ()
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="hs-keyword">do</span><span>
</span><span id="line-152"></span><span>            </span><span class="annot"><span class="annottext">ByteString -&gt; IO ()
</span><a href="../../bytestring/src/Data.ByteString.Lazy.html#putStr"><span class="hs-identifier hs-var">LBS.putStr</span></a></span><span> </span><span class="annot"><span class="annottext">ByteString
</span><a href="#local-6989586621679715049"><span class="hs-identifier hs-var">logText</span></a></span><span>
</span><span id="line-153"></span><span>            </span><span class="annot"><span class="annottext">Char -&gt; IO ()
</span><a href="../../base/src/System.IO.html#putChar"><span class="hs-identifier hs-var">putChar</span></a></span><span> </span><span class="annot"><span class="annottext">Char
</span><span class="hs-char">'\n'</span></span><span>
</span><span id="line-154"></span><span>
</span><span id="line-155"></span><span>        </span><span class="annot"><span class="annottext">TestSuiteLog -&gt; IO TestSuiteLog
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="annot"><span class="annottext">TestSuiteLog
</span><a href="#local-6989586621679715032"><span class="hs-identifier hs-var">suiteLog</span></a></span><span>
</span><span id="line-156"></span><span>
</span><span id="line-157"></span><span>    </span><span class="hs-comment">-- Write summary notice to terminal indicating end of test suite</span><span>
</span><span id="line-158"></span><span>    </span><span class="annot"><span class="annottext">Verbosity -&gt; String -&gt; IO ()
</span><a href="Distribution.Simple.Utils.html#notice"><span class="hs-identifier hs-var">notice</span></a></span><span> </span><span class="annot"><span class="annottext">Verbosity
</span><a href="#local-6989586621679715098"><span class="hs-identifier hs-var">verbosity</span></a></span><span> </span><span class="annot"><span class="annottext">(String -&gt; IO ()) -&gt; String -&gt; IO ()
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">TestSuiteLog -&gt; String
</span><a href="Distribution.Simple.Test.Log.html#summarizeSuiteFinish"><span class="hs-identifier hs-var">summarizeSuiteFinish</span></a></span><span> </span><span class="annot"><span class="annottext">TestSuiteLog
</span><a href="#local-6989586621679715087"><span class="hs-identifier hs-var">suiteLog</span></a></span><span>
</span><span id="line-159"></span><span>
</span><span id="line-160"></span><span>    </span><span class="annot"><span class="annottext">Bool -&gt; IO () -&gt; IO ()
forall (f :: * -&gt; *). Applicative f =&gt; Bool -&gt; f () -&gt; f ()
</span><a href="../../base/src/GHC.Base.html#when"><span class="hs-identifier hs-var">when</span></a></span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621679715112"><span class="hs-identifier hs-var">isCoverageEnabled</span></a></span><span> </span><span class="annot"><span class="annottext">(IO () -&gt; IO ()) -&gt; IO () -&gt; IO ()
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span>
</span><span id="line-161"></span><span>        </span><span class="annot"><span class="annottext">Verbosity
-&gt; LocalBuildInfo -&gt; String -&gt; String -&gt; TestSuite -&gt; IO ()
</span><a href="Distribution.Simple.Hpc.html#markupTest"><span class="hs-identifier hs-var">markupTest</span></a></span><span> </span><span class="annot"><span class="annottext">Verbosity
</span><a href="#local-6989586621679715098"><span class="hs-identifier hs-var">verbosity</span></a></span><span> </span><span class="annot"><span class="annottext">LocalBuildInfo
</span><a href="#local-6989586621679715116"><span class="hs-identifier hs-var">lbi</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679715093"><span class="hs-identifier hs-var">distPref</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">PackageIdentifier -&gt; String
forall a. Pretty a =&gt; a -&gt; String
</span><a href="Distribution.Pretty.html#prettyShow"><span class="hs-identifier hs-var">prettyShow</span></a></span><span> </span><span class="annot"><span class="annottext">(PackageIdentifier -&gt; String) -&gt; PackageIdentifier -&gt; String
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">PackageDescription -&gt; PackageIdentifier
</span><a href="Distribution.Types.PackageDescription.html#package"><span class="hs-identifier hs-var hs-var">PD.package</span></a></span><span> </span><span class="annot"><span class="annottext">PackageDescription
</span><a href="#local-6989586621679715117"><span class="hs-identifier hs-var">pkg_descr</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">TestSuite
</span><a href="#local-6989586621679715113"><span class="hs-identifier hs-var">suite</span></a></span><span>
</span><span id="line-162"></span><span>
</span><span id="line-163"></span><span>    </span><span class="annot"><span class="annottext">TestSuiteLog -&gt; IO TestSuiteLog
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="annot"><span class="annottext">TestSuiteLog
</span><a href="#local-6989586621679715087"><span class="hs-identifier hs-var">suiteLog</span></a></span><span>
</span><span id="line-164"></span><span>  </span><span class="hs-keyword">where</span><span>
</span><span id="line-165"></span><span>    </span><span id="local-6989586621679715092"><span class="annot"><span class="annottext">testName' :: String
</span><a href="#local-6989586621679715092"><span class="hs-identifier hs-var hs-var">testName'</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">UnqualComponentName -&gt; String
</span><a href="Distribution.Types.UnqualComponentName.html#unUnqualComponentName"><span class="hs-identifier hs-var">unUnqualComponentName</span></a></span><span> </span><span class="annot"><span class="annottext">(UnqualComponentName -&gt; String) -&gt; UnqualComponentName -&gt; String
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">TestSuite -&gt; UnqualComponentName
</span><a href="Distribution.Types.TestSuite.html#testName"><span class="hs-identifier hs-var hs-var">PD.testName</span></a></span><span> </span><span class="annot"><span class="annottext">TestSuite
</span><a href="#local-6989586621679715113"><span class="hs-identifier hs-var">suite</span></a></span><span>
</span><span id="line-166"></span><span>
</span><span id="line-167"></span><span>    </span><span id="local-6989586621679715084"><span class="annot"><span class="annottext">deleteIfExists :: String -&gt; IO ()
</span><a href="#local-6989586621679715084"><span class="hs-identifier hs-var hs-var">deleteIfExists</span></a></span></span><span> </span><span id="local-6989586621679714993"><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679714993"><span class="hs-identifier hs-var">file</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">do</span><span>
</span><span id="line-168"></span><span>        </span><span id="local-6989586621679714992"><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621679714992"><span class="hs-identifier hs-var">exists</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">String -&gt; IO Bool
</span><a href="../../directory/src/System.Directory.html#doesFileExist"><span class="hs-identifier hs-var">doesFileExist</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679714993"><span class="hs-identifier hs-var">file</span></a></span><span>
</span><span id="line-169"></span><span>        </span><span class="annot"><span class="annottext">Bool -&gt; IO () -&gt; IO ()
forall (f :: * -&gt; *). Applicative f =&gt; Bool -&gt; f () -&gt; f ()
</span><a href="../../base/src/GHC.Base.html#when"><span class="hs-identifier hs-var">when</span></a></span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621679714992"><span class="hs-identifier hs-var">exists</span></a></span><span> </span><span class="annot"><span class="annottext">(IO () -&gt; IO ()) -&gt; IO () -&gt; IO ()
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">String -&gt; IO ()
</span><a href="../../directory/src/System.Directory.html#removeFile"><span class="hs-identifier hs-var">removeFile</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679714993"><span class="hs-identifier hs-var">file</span></a></span><span>
</span><span id="line-170"></span><span>
</span><span id="line-171"></span><span>    </span><span id="local-6989586621679715038"><span class="annot"><span class="annottext">testLogDir :: String
</span><a href="#local-6989586621679715038"><span class="hs-identifier hs-var hs-var">testLogDir</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679715093"><span class="hs-identifier hs-var">distPref</span></a></span><span> </span><span class="annot"><span class="annottext">String -&gt; String -&gt; String
</span><a href="../../filepath/src/System.FilePath.Windows.html#%3C%2F%3E"><span class="hs-operator hs-var">&lt;/&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;test&quot;</span></span><span>
</span><span id="line-172"></span><span>    </span><span id="local-6989586621679715085"><span class="annot"><span class="annottext">openCabalTemp :: IO String
</span><a href="#local-6989586621679715085"><span class="hs-identifier hs-var hs-var">openCabalTemp</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">do</span><span>
</span><span id="line-173"></span><span>        </span><span class="hs-special">(</span><span id="local-6989586621679714988"><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679714988"><span class="hs-identifier hs-var">f</span></a></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621679714987"><span class="annot"><span class="annottext">Handle
</span><a href="#local-6989586621679714987"><span class="hs-identifier hs-var">h</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">String -&gt; String -&gt; IO (String, Handle)
</span><a href="../../base/src/System.IO.html#openTempFile"><span class="hs-identifier hs-var">openTempFile</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679715038"><span class="hs-identifier hs-var">testLogDir</span></a></span><span> </span><span class="annot"><span class="annottext">(String -&gt; IO (String, Handle)) -&gt; String -&gt; IO (String, Handle)
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;cabal-test-&quot;</span></span><span> </span><span class="annot"><span class="annottext">String -&gt; String -&gt; String
</span><a href="../../filepath/src/System.FilePath.Windows.html#%3C.%3E"><span class="hs-operator hs-var">&lt;.&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;log&quot;</span></span><span>
</span><span id="line-174"></span><span>        </span><span class="annot"><span class="annottext">Handle -&gt; IO ()
</span><a href="../../base/src/GHC.IO.Handle.html#hClose"><span class="hs-identifier hs-var">hClose</span></a></span><span> </span><span class="annot"><span class="annottext">Handle
</span><a href="#local-6989586621679714987"><span class="hs-identifier hs-var">h</span></a></span><span> </span><span class="annot"><span class="annottext">IO () -&gt; IO String -&gt; IO String
forall (m :: * -&gt; *) a b. Monad m =&gt; m a -&gt; m b -&gt; m b
</span><a href="../../base/src/GHC.Base.html#%3E%3E"><span class="hs-operator hs-var">&gt;&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">String -&gt; IO String
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679714988"><span class="hs-identifier hs-var">f</span></a></span><span>
</span><span id="line-175"></span><span>
</span><span id="line-176"></span><span>    </span><span id="local-6989586621679715093"><span class="annot"><span class="annottext">distPref :: String
</span><a href="#local-6989586621679715093"><span class="hs-identifier hs-var hs-var">distPref</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Flag String -&gt; String
forall a. WithCallStack (Flag a -&gt; a)
</span><a href="Distribution.Simple.Flag.html#fromFlag"><span class="hs-identifier hs-var">fromFlag</span></a></span><span> </span><span class="annot"><span class="annottext">(Flag String -&gt; String) -&gt; Flag String -&gt; String
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">TestFlags -&gt; Flag String
</span><a href="Distribution.Simple.Setup.html#testDistPref"><span class="hs-identifier hs-var hs-var">testDistPref</span></a></span><span> </span><span class="annot"><span class="annottext">TestFlags
</span><a href="#local-6989586621679715114"><span class="hs-identifier hs-var">flags</span></a></span><span>
</span><span id="line-177"></span><span>    </span><span id="local-6989586621679715098"><span class="annot"><span class="annottext">verbosity :: Verbosity
</span><a href="#local-6989586621679715098"><span class="hs-identifier hs-var hs-var">verbosity</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Flag Verbosity -&gt; Verbosity
forall a. WithCallStack (Flag a -&gt; a)
</span><a href="Distribution.Simple.Flag.html#fromFlag"><span class="hs-identifier hs-var">fromFlag</span></a></span><span> </span><span class="annot"><span class="annottext">(Flag Verbosity -&gt; Verbosity) -&gt; Flag Verbosity -&gt; Verbosity
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">TestFlags -&gt; Flag Verbosity
</span><a href="Distribution.Simple.Setup.html#testVerbosity"><span class="hs-identifier hs-var hs-var">testVerbosity</span></a></span><span> </span><span class="annot"><span class="annottext">TestFlags
</span><a href="#local-6989586621679715114"><span class="hs-identifier hs-var">flags</span></a></span><span>
</span><span id="line-178"></span><span>
</span><span id="line-179"></span><span class="hs-comment">-- TODO: This is abusing the notion of a 'PathTemplate'.  The result isn't</span><span>
</span><span id="line-180"></span><span class="hs-comment">-- necessarily a path.</span><span>
</span><span id="line-181"></span><span class="annot"><a href="Distribution.Simple.Test.LibV09.html#testOption"><span class="hs-identifier hs-type">testOption</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="Distribution.Types.PackageDescription.html#PackageDescription"><span class="hs-identifier hs-type">PD.PackageDescription</span></a></span><span>
</span><span id="line-182"></span><span>           </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Distribution.Types.LocalBuildInfo.html#LocalBuildInfo"><span class="hs-identifier hs-type">LBI.LocalBuildInfo</span></a></span><span>
</span><span id="line-183"></span><span>           </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Distribution.Types.TestSuite.html#TestSuite"><span class="hs-identifier hs-type">PD.TestSuite</span></a></span><span>
</span><span id="line-184"></span><span>           </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Distribution.Simple.InstallDirs.html#PathTemplate"><span class="hs-identifier hs-type">PathTemplate</span></a></span><span>
</span><span id="line-185"></span><span>           </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../base/src/GHC.Base.html#String"><span class="hs-identifier hs-type">String</span></a></span><span>
</span><span id="line-186"></span><span id="testOption"><span class="annot"><span class="annottext">testOption :: PackageDescription
-&gt; LocalBuildInfo -&gt; TestSuite -&gt; PathTemplate -&gt; String
</span><a href="Distribution.Simple.Test.LibV09.html#testOption"><span class="hs-identifier hs-var hs-var">testOption</span></a></span></span><span> </span><span id="local-6989586621679714979"><span class="annot"><span class="annottext">PackageDescription
</span><a href="#local-6989586621679714979"><span class="hs-identifier hs-var">pkg_descr</span></a></span></span><span> </span><span id="local-6989586621679714978"><span class="annot"><span class="annottext">LocalBuildInfo
</span><a href="#local-6989586621679714978"><span class="hs-identifier hs-var">lbi</span></a></span></span><span> </span><span id="local-6989586621679714977"><span class="annot"><span class="annottext">TestSuite
</span><a href="#local-6989586621679714977"><span class="hs-identifier hs-var">suite</span></a></span></span><span> </span><span id="local-6989586621679714976"><span class="annot"><span class="annottext">PathTemplate
</span><a href="#local-6989586621679714976"><span class="hs-identifier hs-var">template</span></a></span></span><span> </span><span class="hs-glyph">=</span><span>
</span><span id="line-187"></span><span>    </span><span class="annot"><span class="annottext">PathTemplate -&gt; String
</span><a href="Distribution.Simple.InstallDirs.html#fromPathTemplate"><span class="hs-identifier hs-var">fromPathTemplate</span></a></span><span> </span><span class="annot"><span class="annottext">(PathTemplate -&gt; String) -&gt; PathTemplate -&gt; String
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">PathTemplateEnv -&gt; PathTemplate -&gt; PathTemplate
</span><a href="Distribution.Simple.InstallDirs.html#substPathTemplate"><span class="hs-identifier hs-var">substPathTemplate</span></a></span><span> </span><span class="annot"><span class="annottext">PathTemplateEnv
</span><a href="#local-6989586621679714973"><span class="hs-identifier hs-var">env</span></a></span><span> </span><span class="annot"><span class="annottext">PathTemplate
</span><a href="#local-6989586621679714976"><span class="hs-identifier hs-var">template</span></a></span><span>
</span><span id="line-188"></span><span>  </span><span class="hs-keyword">where</span><span>
</span><span id="line-189"></span><span>    </span><span id="local-6989586621679714973"><span class="annot"><span class="annottext">env :: PathTemplateEnv
</span><a href="#local-6989586621679714973"><span class="hs-identifier hs-var hs-var">env</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">PackageIdentifier
-&gt; UnitId -&gt; CompilerInfo -&gt; Platform -&gt; PathTemplateEnv
</span><a href="Distribution.Simple.InstallDirs.html#initialPathTemplateEnv"><span class="hs-identifier hs-var">initialPathTemplateEnv</span></a></span><span>
</span><span id="line-190"></span><span>          </span><span class="hs-special">(</span><span class="annot"><span class="annottext">PackageDescription -&gt; PackageIdentifier
</span><a href="Distribution.Types.PackageDescription.html#package"><span class="hs-identifier hs-var hs-var">PD.package</span></a></span><span> </span><span class="annot"><span class="annottext">PackageDescription
</span><a href="#local-6989586621679714979"><span class="hs-identifier hs-var">pkg_descr</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">LocalBuildInfo -&gt; UnitId
</span><a href="Distribution.Types.LocalBuildInfo.html#localUnitId"><span class="hs-identifier hs-var">LBI.localUnitId</span></a></span><span> </span><span class="annot"><span class="annottext">LocalBuildInfo
</span><a href="#local-6989586621679714978"><span class="hs-identifier hs-var">lbi</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-191"></span><span>          </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Compiler -&gt; CompilerInfo
</span><a href="Distribution.Simple.Compiler.html#compilerInfo"><span class="hs-identifier hs-var">compilerInfo</span></a></span><span> </span><span class="annot"><span class="annottext">(Compiler -&gt; CompilerInfo) -&gt; Compiler -&gt; CompilerInfo
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">LocalBuildInfo -&gt; Compiler
</span><a href="Distribution.Types.LocalBuildInfo.html#compiler"><span class="hs-identifier hs-var hs-var">LBI.compiler</span></a></span><span> </span><span class="annot"><span class="annottext">LocalBuildInfo
</span><a href="#local-6989586621679714978"><span class="hs-identifier hs-var">lbi</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">LocalBuildInfo -&gt; Platform
</span><a href="Distribution.Types.LocalBuildInfo.html#hostPlatform"><span class="hs-identifier hs-var hs-var">LBI.hostPlatform</span></a></span><span> </span><span class="annot"><span class="annottext">LocalBuildInfo
</span><a href="#local-6989586621679714978"><span class="hs-identifier hs-var">lbi</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">PathTemplateEnv -&gt; PathTemplateEnv -&gt; PathTemplateEnv
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span>
</span><span id="line-192"></span><span>          </span><span class="hs-special">[</span><span class="hs-special">(</span><span class="annot"><span class="annottext">PathTemplateVariable
</span><a href="Distribution.Simple.InstallDirs.Internal.html#TestSuiteNameVar"><span class="hs-identifier hs-var">TestSuiteNameVar</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">String -&gt; PathTemplate
</span><a href="Distribution.Simple.InstallDirs.html#toPathTemplate"><span class="hs-identifier hs-var">toPathTemplate</span></a></span><span> </span><span class="annot"><span class="annottext">(String -&gt; PathTemplate) -&gt; String -&gt; PathTemplate
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">UnqualComponentName -&gt; String
</span><a href="Distribution.Types.UnqualComponentName.html#unUnqualComponentName"><span class="hs-identifier hs-var">unUnqualComponentName</span></a></span><span> </span><span class="annot"><span class="annottext">(UnqualComponentName -&gt; String) -&gt; UnqualComponentName -&gt; String
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">TestSuite -&gt; UnqualComponentName
</span><a href="Distribution.Types.TestSuite.html#testName"><span class="hs-identifier hs-var hs-var">PD.testName</span></a></span><span> </span><span class="annot"><span class="annottext">TestSuite
</span><a href="#local-6989586621679714977"><span class="hs-identifier hs-var">suite</span></a></span><span class="hs-special">)</span><span class="hs-special">]</span><span>
</span><span id="line-193"></span><span>
</span><span id="line-194"></span><span class="hs-comment">-- Test stub ----------</span><span>
</span><span id="line-195"></span><span>
</span><span id="line-196"></span><span class="hs-comment">-- | The name of the stub executable associated with a library 'TestSuite'.</span><span>
</span><span id="line-197"></span><span class="annot"><a href="Distribution.Simple.Test.LibV09.html#stubName"><span class="hs-identifier hs-type">stubName</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="Distribution.Types.TestSuite.html#TestSuite"><span class="hs-identifier hs-type">PD.TestSuite</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../base/src/GHC.IO.html#FilePath"><span class="hs-identifier hs-type">FilePath</span></a></span><span>
</span><span id="line-198"></span><span id="stubName"><span class="annot"><span class="annottext">stubName :: TestSuite -&gt; String
</span><a href="Distribution.Simple.Test.LibV09.html#stubName"><span class="hs-identifier hs-var hs-var">stubName</span></a></span></span><span> </span><span id="local-6989586621679714965"><span class="annot"><span class="annottext">TestSuite
</span><a href="#local-6989586621679714965"><span class="hs-identifier hs-var">t</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">UnqualComponentName -&gt; String
</span><a href="Distribution.Types.UnqualComponentName.html#unUnqualComponentName"><span class="hs-identifier hs-var">unUnqualComponentName</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">TestSuite -&gt; UnqualComponentName
</span><a href="Distribution.Types.TestSuite.html#testName"><span class="hs-identifier hs-var hs-var">PD.testName</span></a></span><span> </span><span class="annot"><span class="annottext">TestSuite
</span><a href="#local-6989586621679714965"><span class="hs-identifier hs-var">t</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">String -&gt; String -&gt; String
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;Stub&quot;</span></span><span>
</span><span id="line-199"></span><span>
</span><span id="line-200"></span><span class="hs-comment">-- | The filename of the source file for the stub executable associated with a</span><span>
</span><span id="line-201"></span><span class="hs-comment">-- library 'TestSuite'.</span><span>
</span><span id="line-202"></span><span class="annot"><a href="Distribution.Simple.Test.LibV09.html#stubFilePath"><span class="hs-identifier hs-type">stubFilePath</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="Distribution.Types.TestSuite.html#TestSuite"><span class="hs-identifier hs-type">PD.TestSuite</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../base/src/GHC.IO.html#FilePath"><span class="hs-identifier hs-type">FilePath</span></a></span><span>
</span><span id="line-203"></span><span id="stubFilePath"><span class="annot"><span class="annottext">stubFilePath :: TestSuite -&gt; String
</span><a href="Distribution.Simple.Test.LibV09.html#stubFilePath"><span class="hs-identifier hs-var hs-var">stubFilePath</span></a></span></span><span> </span><span id="local-6989586621679714964"><span class="annot"><span class="annottext">TestSuite
</span><a href="#local-6989586621679714964"><span class="hs-identifier hs-var">t</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">TestSuite -&gt; String
</span><a href="Distribution.Simple.Test.LibV09.html#stubName"><span class="hs-identifier hs-var">stubName</span></a></span><span> </span><span class="annot"><span class="annottext">TestSuite
</span><a href="#local-6989586621679714964"><span class="hs-identifier hs-var">t</span></a></span><span> </span><span class="annot"><span class="annottext">String -&gt; String -&gt; String
</span><a href="../../filepath/src/System.FilePath.Windows.html#%3C.%3E"><span class="hs-operator hs-var">&lt;.&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;hs&quot;</span></span><span>
</span><span id="line-204"></span><span>
</span><span id="line-205"></span><span class="hs-comment">-- | Write the source file for a library 'TestSuite' stub executable.</span><span>
</span><span id="line-206"></span><span class="annot"><a href="Distribution.Simple.Test.LibV09.html#writeSimpleTestStub"><span class="hs-identifier hs-type">writeSimpleTestStub</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="Distribution.Types.TestSuite.html#TestSuite"><span class="hs-identifier hs-type">PD.TestSuite</span></a></span><span> </span><span class="hs-comment">-- ^ library 'TestSuite' for which a stub</span><span>
</span><span id="line-207"></span><span>                                    </span><span class="hs-comment">-- is being created</span><span>
</span><span id="line-208"></span><span>                    </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../base/src/GHC.IO.html#FilePath"><span class="hs-identifier hs-type">FilePath</span></a></span><span>     </span><span class="hs-comment">-- ^ path to directory where stub source</span><span>
</span><span id="line-209"></span><span>                                    </span><span class="hs-comment">-- should be located</span><span>
</span><span id="line-210"></span><span>                    </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">IO</span></span><span> </span><span class="hs-special">(</span><span class="hs-special">)</span><span>
</span><span id="line-211"></span><span id="writeSimpleTestStub"><span class="annot"><span class="annottext">writeSimpleTestStub :: TestSuite -&gt; String -&gt; IO ()
</span><a href="Distribution.Simple.Test.LibV09.html#writeSimpleTestStub"><span class="hs-identifier hs-var hs-var">writeSimpleTestStub</span></a></span></span><span> </span><span id="local-6989586621679714963"><span class="annot"><span class="annottext">TestSuite
</span><a href="#local-6989586621679714963"><span class="hs-identifier hs-var">t</span></a></span></span><span> </span><span id="local-6989586621679714962"><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679714962"><span class="hs-identifier hs-var">dir</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">do</span><span>
</span><span id="line-212"></span><span>    </span><span class="annot"><span class="annottext">Bool -&gt; String -&gt; IO ()
</span><a href="../../directory/src/System.Directory.html#createDirectoryIfMissing"><span class="hs-identifier hs-var">createDirectoryIfMissing</span></a></span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier hs-var">True</span></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679714962"><span class="hs-identifier hs-var">dir</span></a></span><span>
</span><span id="line-213"></span><span>    </span><span class="hs-keyword">let</span><span> </span><span id="local-6989586621679714961"><span class="annot"><span class="annottext">filename :: String
</span><a href="#local-6989586621679714961"><span class="hs-identifier hs-var hs-var">filename</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679714962"><span class="hs-identifier hs-var">dir</span></a></span><span> </span><span class="annot"><span class="annottext">String -&gt; String -&gt; String
</span><a href="../../filepath/src/System.FilePath.Windows.html#%3C%2F%3E"><span class="hs-operator hs-var">&lt;/&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">TestSuite -&gt; String
</span><a href="Distribution.Simple.Test.LibV09.html#stubFilePath"><span class="hs-identifier hs-var">stubFilePath</span></a></span><span> </span><span class="annot"><span class="annottext">TestSuite
</span><a href="#local-6989586621679714963"><span class="hs-identifier hs-var">t</span></a></span><span>
</span><span id="line-214"></span><span>        </span><span id="local-6989586621679714958"><span class="annot"><span class="annottext">m :: ModuleName
</span><a href="#local-6989586621679714958"><span class="hs-identifier hs-var hs-var">m</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">TestSuite -&gt; TestSuiteInterface
</span><a href="Distribution.Types.TestSuite.html#testInterface"><span class="hs-identifier hs-var hs-var">PD.testInterface</span></a></span><span> </span><span class="annot"><span class="annottext">TestSuite
</span><a href="#local-6989586621679714963"><span class="hs-identifier hs-var">t</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-215"></span><span>            </span><span class="annot"><a href="Distribution.Types.TestSuiteInterface.html#TestSuiteLibV09"><span class="hs-identifier hs-type">PD.TestSuiteLibV09</span></a></span><span> </span><span class="annot"><span class="annottext">Version
</span><span class="hs-identifier">_</span></span><span>  </span><span id="local-6989586621679714955"><span class="annot"><span class="annottext">ModuleName
</span><a href="#local-6989586621679714955"><span class="hs-identifier hs-var">m'</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">ModuleName
</span><a href="#local-6989586621679714955"><span class="hs-identifier hs-var">m'</span></a></span><span>
</span><span id="line-216"></span><span>            </span><span class="annot"><span class="annottext">TestSuiteInterface
</span><span class="hs-identifier">_</span></span><span>                        </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">String -&gt; ModuleName
forall a. HasCallStack =&gt; String -&gt; a
</span><a href="../../base/src/GHC.Err.html#error"><span class="hs-identifier hs-var">error</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;writeSimpleTestStub: invalid TestSuite passed&quot;</span></span><span>
</span><span id="line-217"></span><span>    </span><span class="annot"><span class="annottext">String -&gt; String -&gt; IO ()
</span><a href="../../base/src/System.IO.html#writeFile"><span class="hs-identifier hs-var">writeFile</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679714961"><span class="hs-identifier hs-var">filename</span></a></span><span> </span><span class="annot"><span class="annottext">(String -&gt; IO ()) -&gt; String -&gt; IO ()
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">ModuleName -&gt; String
</span><a href="Distribution.Simple.Test.LibV09.html#simpleTestStub"><span class="hs-identifier hs-var">simpleTestStub</span></a></span><span> </span><span class="annot"><span class="annottext">ModuleName
</span><a href="#local-6989586621679714958"><span class="hs-identifier hs-var">m</span></a></span><span>
</span><span id="line-218"></span><span>
</span><span id="line-219"></span><span class="hs-comment">-- | Source code for library test suite stub executable</span><span>
</span><span id="line-220"></span><span class="annot"><a href="Distribution.Simple.Test.LibV09.html#simpleTestStub"><span class="hs-identifier hs-type">simpleTestStub</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="Distribution.ModuleName.html#ModuleName"><span class="hs-identifier hs-type">ModuleName</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../base/src/GHC.Base.html#String"><span class="hs-identifier hs-type">String</span></a></span><span>
</span><span id="line-221"></span><span id="simpleTestStub"><span class="annot"><span class="annottext">simpleTestStub :: ModuleName -&gt; String
</span><a href="Distribution.Simple.Test.LibV09.html#simpleTestStub"><span class="hs-identifier hs-var hs-var">simpleTestStub</span></a></span></span><span> </span><span id="local-6989586621679714953"><span class="annot"><span class="annottext">ModuleName
</span><a href="#local-6989586621679714953"><span class="hs-identifier hs-var">m</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">[String] -&gt; String
</span><a href="../../base/src/Data.OldList.html#unlines"><span class="hs-identifier hs-var">unlines</span></a></span><span>
</span><span id="line-222"></span><span>    </span><span class="hs-special">[</span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;module Main ( main ) where&quot;</span></span><span>
</span><span id="line-223"></span><span>    </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;import Distribution.Simple.Test.LibV09 ( stubMain )&quot;</span></span><span>
</span><span id="line-224"></span><span>    </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;import &quot;</span></span><span> </span><span class="annot"><span class="annottext">String -&gt; String -&gt; String
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span> </span><span class="annot"><span class="annottext">Doc -&gt; String
forall a. Show a =&gt; a -&gt; String
</span><a href="../../base/src/GHC.Show.html#show"><span class="hs-identifier hs-var">show</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">ModuleName -&gt; Doc
forall a. Pretty a =&gt; a -&gt; Doc
</span><a href="Distribution.Pretty.html#pretty"><span class="hs-identifier hs-var">pretty</span></a></span><span> </span><span class="annot"><span class="annottext">ModuleName
</span><a href="#local-6989586621679714953"><span class="hs-identifier hs-var">m</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">String -&gt; String -&gt; String
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot; ( tests )&quot;</span></span><span>
</span><span id="line-225"></span><span>    </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;main :: IO ()&quot;</span></span><span>
</span><span id="line-226"></span><span>    </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;main = stubMain tests&quot;</span></span><span>
</span><span id="line-227"></span><span>    </span><span class="hs-special">]</span><span>
</span><span id="line-228"></span><span>
</span><span id="line-229"></span><span class="hs-comment">-- | Main function for test stubs. Once, it was written directly into the stub,</span><span>
</span><span id="line-230"></span><span class="hs-comment">-- but minimizing the amount of code actually in the stub maximizes the number</span><span>
</span><span id="line-231"></span><span class="hs-comment">-- of detectable errors when Cabal is compiled.</span><span>
</span><span id="line-232"></span><span class="annot"><a href="Distribution.Simple.Test.LibV09.html#stubMain"><span class="hs-identifier hs-type">stubMain</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><span class="hs-identifier hs-type">IO</span></span><span> </span><span class="hs-special">[</span><span class="annot"><a href="Distribution.TestSuite.html#Test"><span class="hs-identifier hs-type">Test</span></a></span><span class="hs-special">]</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">IO</span></span><span> </span><span class="hs-special">(</span><span class="hs-special">)</span><span>
</span><span id="line-233"></span><span id="stubMain"><span class="annot"><span class="annottext">stubMain :: IO [Test] -&gt; IO ()
</span><a href="Distribution.Simple.Test.LibV09.html#stubMain"><span class="hs-identifier hs-var hs-var">stubMain</span></a></span></span><span> </span><span id="local-6989586621679714950"><span class="annot"><span class="annottext">IO [Test]
</span><a href="#local-6989586621679714950"><span class="hs-identifier hs-var">tests</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">do</span><span>
</span><span id="line-234"></span><span>    </span><span class="hs-special">(</span><span id="local-6989586621679714949"><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679714949"><span class="hs-identifier hs-var">f</span></a></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621679714948"><span class="annot"><span class="annottext">UnqualComponentName
</span><a href="#local-6989586621679714948"><span class="hs-identifier hs-var">n</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">(String -&gt; (String, UnqualComponentName))
-&gt; IO String -&gt; IO (String, UnqualComponentName)
forall (f :: * -&gt; *) a b. Functor f =&gt; (a -&gt; b) -&gt; f a -&gt; f b
</span><a href="../../base/src/GHC.Base.html#fmap"><span class="hs-identifier hs-var">fmap</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-glyph">\</span><span id="local-6989586621679714947"><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679714947"><span class="hs-identifier hs-var">s</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">(String, UnqualComponentName)
-&gt; Maybe (String, UnqualComponentName)
-&gt; (String, UnqualComponentName)
forall a. a -&gt; Maybe a -&gt; a
</span><a href="../../base/src/Data.Maybe.html#fromMaybe"><span class="hs-identifier hs-var">fromMaybe</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">String -&gt; (String, UnqualComponentName)
forall a. HasCallStack =&gt; String -&gt; a
</span><a href="../../base/src/GHC.Err.html#error"><span class="hs-identifier hs-var">error</span></a></span><span> </span><span class="annot"><span class="annottext">(String -&gt; (String, UnqualComponentName))
-&gt; String -&gt; (String, UnqualComponentName)
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;panic! read &quot;</span></span><span> </span><span class="annot"><span class="annottext">String -&gt; String -&gt; String
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span> </span><span class="annot"><span class="annottext">String -&gt; String
forall a. Show a =&gt; a -&gt; String
</span><a href="../../base/src/GHC.Show.html#show"><span class="hs-identifier hs-var">show</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679714947"><span class="hs-identifier hs-var">s</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">(Maybe (String, UnqualComponentName)
 -&gt; (String, UnqualComponentName))
-&gt; Maybe (String, UnqualComponentName)
-&gt; (String, UnqualComponentName)
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">String -&gt; Maybe (String, UnqualComponentName)
forall a. Read a =&gt; String -&gt; Maybe a
</span><a href="../../base/src/Text.Read.html#readMaybe"><span class="hs-identifier hs-var">readMaybe</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679714947"><span class="hs-identifier hs-var">s</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">IO String
</span><a href="../../base/src/System.IO.html#getContents"><span class="hs-identifier hs-var">getContents</span></a></span><span> </span><span class="hs-comment">-- TODO: eradicateNoParse</span><span>
</span><span id="line-235"></span><span>    </span><span id="local-6989586621679714945"><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679714945"><span class="hs-identifier hs-var">dir</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">IO String
</span><a href="../../directory/src/System.Directory.html#getCurrentDirectory"><span class="hs-identifier hs-var">getCurrentDirectory</span></a></span><span>
</span><span id="line-236"></span><span>    </span><span id="local-6989586621679714944"><span class="annot"><span class="annottext">TestLogs
</span><a href="#local-6989586621679714944"><span class="hs-identifier hs-var">results</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">IO [Test]
</span><a href="#local-6989586621679714950"><span class="hs-identifier hs-var">tests</span></a></span><span> </span><span class="annot"><span class="annottext">IO [Test] -&gt; ([Test] -&gt; IO TestLogs) -&gt; IO TestLogs
forall (m :: * -&gt; *) a b. Monad m =&gt; m a -&gt; (a -&gt; m b) -&gt; m b
</span><a href="../../base/src/GHC.Base.html#%3E%3E%3D"><span class="hs-operator hs-var">&gt;&gt;=</span></a></span><span> </span><span class="annot"><span class="annottext">[Test] -&gt; IO TestLogs
</span><a href="Distribution.Simple.Test.LibV09.html#stubRunTests"><span class="hs-identifier hs-var">stubRunTests</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">IO TestLogs -&gt; (SomeException -&gt; IO TestLogs) -&gt; IO TestLogs
forall e a. Exception e =&gt; IO a -&gt; (e -&gt; IO a) -&gt; IO a
</span><a href="../../base/src/GHC.IO.html#catch"><span class="hs-operator hs-var">`CE.catch`</span></a></span><span> </span><span class="annot"><span class="annottext">SomeException -&gt; IO TestLogs
</span><a href="#local-6989586621679714941"><span class="hs-identifier hs-var">errHandler</span></a></span><span>
</span><span id="line-237"></span><span>    </span><span class="annot"><span class="annottext">String -&gt; IO ()
</span><a href="../../directory/src/System.Directory.html#setCurrentDirectory"><span class="hs-identifier hs-var">setCurrentDirectory</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679714945"><span class="hs-identifier hs-var">dir</span></a></span><span>
</span><span id="line-238"></span><span>    </span><span class="annot"><span class="annottext">String -&gt; UnqualComponentName -&gt; TestLogs -&gt; IO ()
</span><a href="Distribution.Simple.Test.LibV09.html#stubWriteLog"><span class="hs-identifier hs-var">stubWriteLog</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679714949"><span class="hs-identifier hs-var">f</span></a></span><span> </span><span class="annot"><span class="annottext">UnqualComponentName
</span><a href="#local-6989586621679714948"><span class="hs-identifier hs-var">n</span></a></span><span> </span><span class="annot"><span class="annottext">TestLogs
</span><a href="#local-6989586621679714944"><span class="hs-identifier hs-var">results</span></a></span><span>
</span><span id="line-239"></span><span>  </span><span class="hs-keyword">where</span><span>
</span><span id="line-240"></span><span>    </span><span class="annot"><a href="#local-6989586621679714941"><span class="hs-identifier hs-type">errHandler</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../base/src/GHC.Exception.Type.html#SomeException"><span class="hs-identifier hs-type">CE.SomeException</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">IO</span></span><span> </span><span class="annot"><a href="Distribution.Simple.Test.Log.html#TestLogs"><span class="hs-identifier hs-type">TestLogs</span></a></span><span>
</span><span id="line-241"></span><span>    </span><span id="local-6989586621679714941"><span class="annot"><span class="annottext">errHandler :: SomeException -&gt; IO TestLogs
</span><a href="#local-6989586621679714941"><span class="hs-identifier hs-var hs-var">errHandler</span></a></span></span><span> </span><span id="local-6989586621679714940"><span class="annot"><span class="annottext">SomeException
</span><a href="#local-6989586621679714940"><span class="hs-identifier hs-var">e</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">SomeException -&gt; Maybe AsyncException
forall e. Exception e =&gt; SomeException -&gt; Maybe e
</span><a href="../../base/src/GHC.Exception.Type.html#fromException"><span class="hs-identifier hs-var">CE.fromException</span></a></span><span> </span><span class="annot"><span class="annottext">SomeException
</span><a href="#local-6989586621679714940"><span class="hs-identifier hs-var">e</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-242"></span><span>        </span><span class="annot"><a href="../../base/src/GHC.Maybe.html#Just"><span class="hs-identifier hs-type">Just</span></a></span><span> </span><span class="annot"><span class="annottext">AsyncException
</span><a href="../../base/src/GHC.IO.Exception.html#UserInterrupt"><span class="hs-identifier hs-var">CE.UserInterrupt</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">SomeException -&gt; IO TestLogs
forall e a. Exception e =&gt; e -&gt; IO a
</span><a href="../../base/src/GHC.IO.html#throwIO"><span class="hs-identifier hs-var">CE.throwIO</span></a></span><span> </span><span class="annot"><span class="annottext">SomeException
</span><a href="#local-6989586621679714940"><span class="hs-identifier hs-var">e</span></a></span><span>
</span><span id="line-243"></span><span>        </span><span class="annot"><span class="annottext">Maybe AsyncException
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">TestLogs -&gt; IO TestLogs
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="annot"><span class="annottext">(TestLogs -&gt; IO TestLogs) -&gt; TestLogs -&gt; IO TestLogs
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">TestLog :: String -&gt; [(String, String)] -&gt; Result -&gt; TestLogs
</span><a href="Distribution.Simple.Test.Log.html#TestLog"><span class="hs-identifier hs-type">TestLog</span></a></span><span> </span><span class="hs-special">{</span><span> </span><span class="annot"><span class="annottext">testName :: String
</span><a href="Distribution.Simple.Test.Log.html#testName"><span class="hs-identifier hs-var">testName</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;Cabal test suite exception&quot;</span></span><span class="hs-special">,</span><span>
</span><span id="line-244"></span><span>                                </span><span class="annot"><span class="annottext">testOptionsReturned :: [(String, String)]
</span><a href="Distribution.Simple.Test.Log.html#testOptionsReturned"><span class="hs-identifier hs-var">testOptionsReturned</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">[</span><span class="hs-special">]</span><span class="hs-special">,</span><span>
</span><span id="line-245"></span><span>                                </span><span class="annot"><span class="annottext">testResult :: Result
</span><a href="Distribution.Simple.Test.Log.html#testResult"><span class="hs-identifier hs-var">testResult</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">String -&gt; Result
</span><a href="Distribution.TestSuite.html#Error"><span class="hs-identifier hs-var">Error</span></a></span><span> </span><span class="annot"><span class="annottext">(String -&gt; Result) -&gt; String -&gt; Result
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">SomeException -&gt; String
forall a. Show a =&gt; a -&gt; String
</span><a href="../../base/src/GHC.Show.html#show"><span class="hs-identifier hs-var">show</span></a></span><span> </span><span class="annot"><span class="annottext">SomeException
</span><a href="#local-6989586621679714940"><span class="hs-identifier hs-var">e</span></a></span><span> </span><span class="hs-special">}</span><span>
</span><span id="line-246"></span><span>
</span><span id="line-247"></span><span class="hs-comment">-- | The test runner used in library &quot;TestSuite&quot; stub executables.  Runs a list</span><span>
</span><span id="line-248"></span><span class="hs-comment">-- of 'Test's.  An executable calling this function is meant to be invoked as</span><span>
</span><span id="line-249"></span><span class="hs-comment">-- the child of a Cabal process during @.\/setup test@.  A 'TestSuiteLog',</span><span>
</span><span id="line-250"></span><span class="hs-comment">-- provided by Cabal, is read from the standard input; it supplies the name of</span><span>
</span><span id="line-251"></span><span class="hs-comment">-- the test suite and the location of the machine-readable test suite log file.</span><span>
</span><span id="line-252"></span><span class="hs-comment">-- Human-readable log information is written to the standard output for capture</span><span>
</span><span id="line-253"></span><span class="hs-comment">-- by the calling Cabal process.</span><span>
</span><span id="line-254"></span><span class="annot"><a href="Distribution.Simple.Test.LibV09.html#stubRunTests"><span class="hs-identifier hs-type">stubRunTests</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="Distribution.TestSuite.html#Test"><span class="hs-identifier hs-type">Test</span></a></span><span class="hs-special">]</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">IO</span></span><span> </span><span class="annot"><a href="Distribution.Simple.Test.Log.html#TestLogs"><span class="hs-identifier hs-type">TestLogs</span></a></span><span>
</span><span id="line-255"></span><span id="stubRunTests"><span class="annot"><span class="annottext">stubRunTests :: [Test] -&gt; IO TestLogs
</span><a href="Distribution.Simple.Test.LibV09.html#stubRunTests"><span class="hs-identifier hs-var hs-var">stubRunTests</span></a></span></span><span> </span><span id="local-6989586621679714931"><span class="annot"><span class="annottext">[Test]
</span><a href="#local-6989586621679714931"><span class="hs-identifier hs-var">tests</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">do</span><span>
</span><span id="line-256"></span><span>    </span><span id="local-6989586621679714930"><span class="annot"><span class="annottext">[TestLogs]
</span><a href="#local-6989586621679714930"><span class="hs-identifier hs-var">logs</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">(Test -&gt; IO TestLogs) -&gt; [Test] -&gt; IO [TestLogs]
forall (t :: * -&gt; *) (f :: * -&gt; *) a b.
(Traversable t, Applicative f) =&gt;
(a -&gt; f b) -&gt; t a -&gt; f (t b)
</span><a href="../../base/src/Data.Traversable.html#traverse"><span class="hs-identifier hs-var">traverse</span></a></span><span> </span><span class="annot"><span class="annottext">Test -&gt; IO TestLogs
</span><a href="#local-6989586621679714928"><span class="hs-identifier hs-var">stubRunTests'</span></a></span><span> </span><span class="annot"><span class="annottext">[Test]
</span><a href="#local-6989586621679714931"><span class="hs-identifier hs-var">tests</span></a></span><span>
</span><span id="line-257"></span><span>    </span><span class="annot"><span class="annottext">TestLogs -&gt; IO TestLogs
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="annot"><span class="annottext">(TestLogs -&gt; IO TestLogs) -&gt; TestLogs -&gt; IO TestLogs
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">String -&gt; [TestLogs] -&gt; TestLogs
</span><a href="Distribution.Simple.Test.Log.html#GroupLogs"><span class="hs-identifier hs-var">GroupLogs</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;Default&quot;</span></span><span> </span><span class="annot"><span class="annottext">[TestLogs]
</span><a href="#local-6989586621679714930"><span class="hs-identifier hs-var">logs</span></a></span><span>
</span><span id="line-258"></span><span>  </span><span class="hs-keyword">where</span><span>
</span><span id="line-259"></span><span>    </span><span id="local-6989586621679714928"><span class="annot"><span class="annottext">stubRunTests' :: Test -&gt; IO TestLogs
</span><a href="#local-6989586621679714928"><span class="hs-identifier hs-var hs-var">stubRunTests'</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Distribution.TestSuite.html#Test"><span class="hs-identifier hs-type">Test</span></a></span><span> </span><span id="local-6989586621679714917"><span class="annot"><span class="annottext">TestInstance
</span><a href="#local-6989586621679714917"><span class="hs-identifier hs-var">t</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">do</span><span>
</span><span id="line-260"></span><span>        </span><span id="local-6989586621679714916"><span class="annot"><span class="annottext">TestLogs
</span><a href="#local-6989586621679714916"><span class="hs-identifier hs-var">l</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">TestInstance -&gt; IO Progress
</span><a href="Distribution.TestSuite.html#run"><span class="hs-identifier hs-var hs-var">run</span></a></span><span> </span><span class="annot"><span class="annottext">TestInstance
</span><a href="#local-6989586621679714917"><span class="hs-identifier hs-var">t</span></a></span><span> </span><span class="annot"><span class="annottext">IO Progress -&gt; (Progress -&gt; IO TestLogs) -&gt; IO TestLogs
forall (m :: * -&gt; *) a b. Monad m =&gt; m a -&gt; (a -&gt; m b) -&gt; m b
</span><a href="../../base/src/GHC.Base.html#%3E%3E%3D"><span class="hs-operator hs-var">&gt;&gt;=</span></a></span><span> </span><span class="annot"><span class="annottext">Progress -&gt; IO TestLogs
</span><a href="#local-6989586621679714914"><span class="hs-identifier hs-var">finish</span></a></span><span>
</span><span id="line-261"></span><span>        </span><span class="annot"><span class="annottext">Verbosity -&gt; TestShowDetails -&gt; TestLogs -&gt; IO ()
</span><a href="Distribution.Simple.Test.Log.html#summarizeTest"><span class="hs-identifier hs-var">summarizeTest</span></a></span><span> </span><span class="annot"><span class="annottext">Verbosity
</span><a href="Distribution.Verbosity.html#normal"><span class="hs-identifier hs-var">normal</span></a></span><span> </span><span class="annot"><span class="annottext">TestShowDetails
</span><a href="Distribution.Simple.Setup.html#Always"><span class="hs-identifier hs-var">Always</span></a></span><span> </span><span class="annot"><span class="annottext">TestLogs
</span><a href="#local-6989586621679714916"><span class="hs-identifier hs-var">l</span></a></span><span>
</span><span id="line-262"></span><span>        </span><span class="annot"><span class="annottext">TestLogs -&gt; IO TestLogs
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="annot"><span class="annottext">TestLogs
</span><a href="#local-6989586621679714916"><span class="hs-identifier hs-var">l</span></a></span><span>
</span><span id="line-263"></span><span>      </span><span class="hs-keyword">where</span><span>
</span><span id="line-264"></span><span>        </span><span id="local-6989586621679714914"><span class="annot"><span class="annottext">finish :: Progress -&gt; IO TestLogs
</span><a href="#local-6989586621679714914"><span class="hs-identifier hs-var hs-var">finish</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Distribution.TestSuite.html#Finished"><span class="hs-identifier hs-type">Finished</span></a></span><span> </span><span id="local-6989586621679714909"><span class="annot"><span class="annottext">Result
</span><a href="#local-6989586621679714909"><span class="hs-identifier hs-var">result</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span>
</span><span id="line-265"></span><span>            </span><span class="annot"><span class="annottext">TestLogs -&gt; IO TestLogs
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="annot"><span class="annottext">TestLog :: String -&gt; [(String, String)] -&gt; Result -&gt; TestLogs
</span><a href="Distribution.Simple.Test.Log.html#TestLog"><span class="hs-identifier hs-type">TestLog</span></a></span><span>
</span><span id="line-266"></span><span>                </span><span class="hs-special">{</span><span> </span><span class="annot"><span class="annottext">testName :: String
</span><a href="Distribution.Simple.Test.Log.html#testName"><span class="hs-identifier hs-var">testName</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">TestInstance -&gt; String
</span><a href="Distribution.TestSuite.html#name"><span class="hs-identifier hs-var hs-var">name</span></a></span><span> </span><span class="annot"><span class="annottext">TestInstance
</span><a href="#local-6989586621679714917"><span class="hs-identifier hs-var">t</span></a></span><span>
</span><span id="line-267"></span><span>                </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">testOptionsReturned :: [(String, String)]
</span><a href="Distribution.Simple.Test.Log.html#testOptionsReturned"><span class="hs-identifier hs-var">testOptionsReturned</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">TestInstance -&gt; [(String, String)]
</span><a href="#local-6989586621679714907"><span class="hs-identifier hs-var">defaultOptions</span></a></span><span> </span><span class="annot"><span class="annottext">TestInstance
</span><a href="#local-6989586621679714917"><span class="hs-identifier hs-var">t</span></a></span><span>
</span><span id="line-268"></span><span>                </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">testResult :: Result
</span><a href="Distribution.Simple.Test.Log.html#testResult"><span class="hs-identifier hs-var">testResult</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Result
</span><a href="#local-6989586621679714909"><span class="hs-identifier hs-var">result</span></a></span><span>
</span><span id="line-269"></span><span>                </span><span class="hs-special">}</span><span>
</span><span id="line-270"></span><span>        </span><span class="annot"><a href="#local-6989586621679714914"><span class="hs-identifier hs-var">finish</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Distribution.TestSuite.html#Progress"><span class="hs-identifier hs-type">Progress</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-identifier">_</span></span><span> </span><span id="local-6989586621679714905"><span class="annot"><span class="annottext">IO Progress
</span><a href="#local-6989586621679714905"><span class="hs-identifier hs-var">next</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">IO Progress
</span><a href="#local-6989586621679714905"><span class="hs-identifier hs-var">next</span></a></span><span> </span><span class="annot"><span class="annottext">IO Progress -&gt; (Progress -&gt; IO TestLogs) -&gt; IO TestLogs
forall (m :: * -&gt; *) a b. Monad m =&gt; m a -&gt; (a -&gt; m b) -&gt; m b
</span><a href="../../base/src/GHC.Base.html#%3E%3E%3D"><span class="hs-operator hs-var">&gt;&gt;=</span></a></span><span> </span><span class="annot"><span class="annottext">Progress -&gt; IO TestLogs
</span><a href="#local-6989586621679714914"><span class="hs-identifier hs-var">finish</span></a></span><span>
</span><span id="line-271"></span><span>    </span><span class="annot"><a href="#local-6989586621679714928"><span class="hs-identifier hs-var">stubRunTests'</span></a></span><span> </span><span id="local-6989586621679714904"><span class="annot"><span class="annottext">g :: Test
</span><a href="#local-6989586621679714904"><span class="hs-identifier hs-var">g</span></a></span></span><span class="hs-glyph">@</span><span class="hs-special">(</span><span class="annot"><a href="Distribution.TestSuite.html#Group"><span class="hs-identifier hs-type">Group</span></a></span><span> </span><span class="hs-special">{</span><span class="hs-special">}</span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">do</span><span>
</span><span id="line-272"></span><span>        </span><span id="local-6989586621679714902"><span class="annot"><span class="annottext">[TestLogs]
</span><a href="#local-6989586621679714902"><span class="hs-identifier hs-var">logs</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">(Test -&gt; IO TestLogs) -&gt; [Test] -&gt; IO [TestLogs]
forall (t :: * -&gt; *) (f :: * -&gt; *) a b.
(Traversable t, Applicative f) =&gt;
(a -&gt; f b) -&gt; t a -&gt; f (t b)
</span><a href="../../base/src/Data.Traversable.html#traverse"><span class="hs-identifier hs-var">traverse</span></a></span><span> </span><span class="annot"><span class="annottext">Test -&gt; IO TestLogs
</span><a href="#local-6989586621679714928"><span class="hs-identifier hs-var">stubRunTests'</span></a></span><span> </span><span class="annot"><span class="annottext">([Test] -&gt; IO [TestLogs]) -&gt; [Test] -&gt; IO [TestLogs]
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">Test -&gt; [Test]
</span><a href="Distribution.TestSuite.html#groupTests"><span class="hs-identifier hs-var hs-var">groupTests</span></a></span><span> </span><span class="annot"><span class="annottext">Test
</span><a href="#local-6989586621679714904"><span class="hs-identifier hs-var">g</span></a></span><span>
</span><span id="line-273"></span><span>        </span><span class="annot"><span class="annottext">TestLogs -&gt; IO TestLogs
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="annot"><span class="annottext">(TestLogs -&gt; IO TestLogs) -&gt; TestLogs -&gt; IO TestLogs
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">String -&gt; [TestLogs] -&gt; TestLogs
</span><a href="Distribution.Simple.Test.Log.html#GroupLogs"><span class="hs-identifier hs-var">GroupLogs</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Test -&gt; String
</span><a href="Distribution.TestSuite.html#groupName"><span class="hs-identifier hs-var hs-var">groupName</span></a></span><span> </span><span class="annot"><span class="annottext">Test
</span><a href="#local-6989586621679714904"><span class="hs-identifier hs-var">g</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">[TestLogs]
</span><a href="#local-6989586621679714902"><span class="hs-identifier hs-var">logs</span></a></span><span>
</span><span id="line-274"></span><span>    </span><span class="annot"><a href="#local-6989586621679714928"><span class="hs-identifier hs-var">stubRunTests'</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Distribution.TestSuite.html#ExtraOptions"><span class="hs-identifier hs-type">ExtraOptions</span></a></span><span> </span><span class="annot"><span class="annottext">[OptionDescr]
</span><span class="hs-identifier">_</span></span><span> </span><span id="local-6989586621679714898"><span class="annot"><span class="annottext">Test
</span><a href="#local-6989586621679714898"><span class="hs-identifier hs-var">t</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Test -&gt; IO TestLogs
</span><a href="#local-6989586621679714928"><span class="hs-identifier hs-var">stubRunTests'</span></a></span><span> </span><span class="annot"><span class="annottext">Test
</span><a href="#local-6989586621679714898"><span class="hs-identifier hs-var">t</span></a></span><span>
</span><span id="line-275"></span><span>    </span><span id="local-6989586621679714897"><span class="annot"><span class="annottext">maybeDefaultOption :: OptionDescr -&gt; Maybe (String, String)
</span><a href="#local-6989586621679714897"><span class="hs-identifier hs-var hs-var">maybeDefaultOption</span></a></span></span><span> </span><span id="local-6989586621679714896"><span class="annot"><span class="annottext">OptionDescr
</span><a href="#local-6989586621679714896"><span class="hs-identifier hs-var">opt</span></a></span></span><span> </span><span class="hs-glyph">=</span><span>
</span><span id="line-276"></span><span>        </span><span class="annot"><span class="annottext">Maybe (String, String)
-&gt; (String -&gt; Maybe (String, String))
-&gt; Maybe String
-&gt; Maybe (String, String)
forall b a. b -&gt; (a -&gt; b) -&gt; Maybe a -&gt; b
</span><a href="../../base/src/Data.Maybe.html#maybe"><span class="hs-identifier hs-var">maybe</span></a></span><span> </span><span class="annot"><span class="annottext">Maybe (String, String)
forall a. Maybe a
</span><a href="../../base/src/GHC.Maybe.html#Nothing"><span class="hs-identifier hs-var">Nothing</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-glyph">\</span><span id="local-6989586621679714894"><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679714894"><span class="hs-identifier hs-var">d</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">(String, String) -&gt; Maybe (String, String)
forall a. a -&gt; Maybe a
</span><a href="../../base/src/GHC.Maybe.html#Just"><span class="hs-identifier hs-var">Just</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">OptionDescr -&gt; String
</span><a href="Distribution.TestSuite.html#optionName"><span class="hs-identifier hs-var hs-var">optionName</span></a></span><span> </span><span class="annot"><span class="annottext">OptionDescr
</span><a href="#local-6989586621679714896"><span class="hs-identifier hs-var">opt</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679714894"><span class="hs-identifier hs-var">d</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">(Maybe String -&gt; Maybe (String, String))
-&gt; Maybe String -&gt; Maybe (String, String)
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">OptionDescr -&gt; Maybe String
</span><a href="Distribution.TestSuite.html#optionDefault"><span class="hs-identifier hs-var hs-var">optionDefault</span></a></span><span> </span><span class="annot"><span class="annottext">OptionDescr
</span><a href="#local-6989586621679714896"><span class="hs-identifier hs-var">opt</span></a></span><span>
</span><span id="line-277"></span><span>    </span><span id="local-6989586621679714907"><span class="annot"><span class="annottext">defaultOptions :: TestInstance -&gt; [(String, String)]
</span><a href="#local-6989586621679714907"><span class="hs-identifier hs-var hs-var">defaultOptions</span></a></span></span><span> </span><span id="local-6989586621679714891"><span class="annot"><span class="annottext">TestInstance
</span><a href="#local-6989586621679714891"><span class="hs-identifier hs-var">testInst</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(OptionDescr -&gt; Maybe (String, String))
-&gt; [OptionDescr] -&gt; [(String, String)]
forall a b. (a -&gt; Maybe b) -&gt; [a] -&gt; [b]
</span><a href="../../base/src/Data.Maybe.html#mapMaybe"><span class="hs-identifier hs-var">mapMaybe</span></a></span><span> </span><span class="annot"><span class="annottext">OptionDescr -&gt; Maybe (String, String)
</span><a href="#local-6989586621679714897"><span class="hs-identifier hs-var">maybeDefaultOption</span></a></span><span> </span><span class="annot"><span class="annottext">([OptionDescr] -&gt; [(String, String)])
-&gt; [OptionDescr] -&gt; [(String, String)]
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">TestInstance -&gt; [OptionDescr]
</span><a href="Distribution.TestSuite.html#options"><span class="hs-identifier hs-var hs-var">options</span></a></span><span> </span><span class="annot"><span class="annottext">TestInstance
</span><a href="#local-6989586621679714891"><span class="hs-identifier hs-var">testInst</span></a></span><span>
</span><span id="line-278"></span><span>
</span><span id="line-279"></span><span class="hs-comment">-- | From a test stub, write the 'TestSuiteLog' to temporary file for the calling</span><span>
</span><span id="line-280"></span><span class="hs-comment">-- Cabal process to read.</span><span>
</span><span id="line-281"></span><span class="annot"><a href="Distribution.Simple.Test.LibV09.html#stubWriteLog"><span class="hs-identifier hs-type">stubWriteLog</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../base/src/GHC.IO.html#FilePath"><span class="hs-identifier hs-type">FilePath</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Distribution.Types.UnqualComponentName.html#UnqualComponentName"><span class="hs-identifier hs-type">UnqualComponentName</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Distribution.Simple.Test.Log.html#TestLogs"><span class="hs-identifier hs-type">TestLogs</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">IO</span></span><span> </span><span class="hs-special">(</span><span class="hs-special">)</span><span>
</span><span id="line-282"></span><span id="stubWriteLog"><span class="annot"><span class="annottext">stubWriteLog :: String -&gt; UnqualComponentName -&gt; TestLogs -&gt; IO ()
</span><a href="Distribution.Simple.Test.LibV09.html#stubWriteLog"><span class="hs-identifier hs-var hs-var">stubWriteLog</span></a></span></span><span> </span><span id="local-6989586621679714888"><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679714888"><span class="hs-identifier hs-var">f</span></a></span></span><span> </span><span id="local-6989586621679714887"><span class="annot"><span class="annottext">UnqualComponentName
</span><a href="#local-6989586621679714887"><span class="hs-identifier hs-var">n</span></a></span></span><span> </span><span id="local-6989586621679714886"><span class="annot"><span class="annottext">TestLogs
</span><a href="#local-6989586621679714886"><span class="hs-identifier hs-var">logs</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">do</span><span>
</span><span id="line-283"></span><span>    </span><span class="hs-keyword">let</span><span> </span><span id="local-6989586621679714885"><span class="annot"><span class="annottext">testLog :: TestSuiteLog
</span><a href="#local-6989586621679714885"><span class="hs-identifier hs-var hs-var">testLog</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">TestSuiteLog :: UnqualComponentName -&gt; TestLogs -&gt; String -&gt; TestSuiteLog
</span><a href="Distribution.Simple.Test.Log.html#TestSuiteLog"><span class="hs-identifier hs-type">TestSuiteLog</span></a></span><span> </span><span class="hs-special">{</span><span> </span><span class="annot"><span class="annottext">testSuiteName :: UnqualComponentName
</span><a href="Distribution.Simple.Test.Log.html#testSuiteName"><span class="hs-identifier hs-var">testSuiteName</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">UnqualComponentName
</span><a href="#local-6989586621679714887"><span class="hs-identifier hs-var">n</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">testLogs :: TestLogs
</span><a href="Distribution.Simple.Test.Log.html#testLogs"><span class="hs-identifier hs-var">testLogs</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">TestLogs
</span><a href="#local-6989586621679714886"><span class="hs-identifier hs-var">logs</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">logFile :: String
</span><a href="Distribution.Simple.Test.Log.html#logFile"><span class="hs-identifier hs-var">logFile</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679714888"><span class="hs-identifier hs-var">f</span></a></span><span> </span><span class="hs-special">}</span><span>
</span><span id="line-284"></span><span>    </span><span class="annot"><span class="annottext">String -&gt; String -&gt; IO ()
</span><a href="../../base/src/System.IO.html#writeFile"><span class="hs-identifier hs-var">writeFile</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">TestSuiteLog -&gt; String
</span><a href="Distribution.Simple.Test.Log.html#logFile"><span class="hs-identifier hs-var hs-var">logFile</span></a></span><span> </span><span class="annot"><span class="annottext">TestSuiteLog
</span><a href="#local-6989586621679714885"><span class="hs-identifier hs-var">testLog</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">(String -&gt; IO ()) -&gt; String -&gt; IO ()
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">TestSuiteLog -&gt; String
forall a. Show a =&gt; a -&gt; String
</span><a href="../../base/src/GHC.Show.html#show"><span class="hs-identifier hs-var">show</span></a></span><span> </span><span class="annot"><span class="annottext">TestSuiteLog
</span><a href="#local-6989586621679714885"><span class="hs-identifier hs-var">testLog</span></a></span><span>
</span><span id="line-285"></span><span>    </span><span class="annot"><span class="annottext">Bool -&gt; IO () -&gt; IO ()
forall (f :: * -&gt; *). Applicative f =&gt; Bool -&gt; f () -&gt; f ()
</span><a href="../../base/src/GHC.Base.html#when"><span class="hs-identifier hs-var">when</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">TestLogs -&gt; Bool
</span><a href="Distribution.Simple.Test.Log.html#suiteError"><span class="hs-identifier hs-var">suiteError</span></a></span><span> </span><span class="annot"><span class="annottext">TestLogs
</span><a href="#local-6989586621679714886"><span class="hs-identifier hs-var">logs</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">(IO () -&gt; IO ()) -&gt; IO () -&gt; IO ()
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">ExitCode -&gt; IO ()
forall a. ExitCode -&gt; IO a
</span><a href="../../base/src/System.Exit.html#exitWith"><span class="hs-identifier hs-var">exitWith</span></a></span><span> </span><span class="annot"><span class="annottext">(ExitCode -&gt; IO ()) -&gt; ExitCode -&gt; IO ()
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">Int -&gt; ExitCode
</span><a href="../../base/src/GHC.IO.Exception.html#ExitFailure"><span class="hs-identifier hs-var">ExitFailure</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">2</span></span><span>
</span><span id="line-286"></span><span>    </span><span class="annot"><span class="annottext">Bool -&gt; IO () -&gt; IO ()
forall (f :: * -&gt; *). Applicative f =&gt; Bool -&gt; f () -&gt; f ()
</span><a href="../../base/src/GHC.Base.html#when"><span class="hs-identifier hs-var">when</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">TestLogs -&gt; Bool
</span><a href="Distribution.Simple.Test.Log.html#suiteFailed"><span class="hs-identifier hs-var">suiteFailed</span></a></span><span> </span><span class="annot"><span class="annottext">TestLogs
</span><a href="#local-6989586621679714886"><span class="hs-identifier hs-var">logs</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">(IO () -&gt; IO ()) -&gt; IO () -&gt; IO ()
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">ExitCode -&gt; IO ()
forall a. ExitCode -&gt; IO a
</span><a href="../../base/src/System.Exit.html#exitWith"><span class="hs-identifier hs-var">exitWith</span></a></span><span> </span><span class="annot"><span class="annottext">(ExitCode -&gt; IO ()) -&gt; ExitCode -&gt; IO ()
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">Int -&gt; ExitCode
</span><a href="../../base/src/GHC.IO.Exception.html#ExitFailure"><span class="hs-identifier hs-var">ExitFailure</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">1</span></span><span>
</span><span id="line-287"></span><span>    </span><span class="annot"><span class="annottext">IO ()
forall a. IO a
</span><a href="../../base/src/System.Exit.html#exitSuccess"><span class="hs-identifier hs-var">exitSuccess</span></a></span><span>
</span><span id="line-288"></span></pre></body></html>